/* CSS Variables for Theme */
:root {
    --bg-color: #f8f9fa;
    --text-color: #1a1a1a;
    --card-bg: #ffffff;
    --card-hover: #f0f0f0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 16px;
    --transition-speed: 0.3s;
    --primary-color: #007bff;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --card-hover: #2c2c2c;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Remove blue highlight on mobile tap */
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    padding-bottom: 6rem;
    /* Extra space for FAB */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Theme Toggle */
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: none;
    padding: 12px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
    color: var(--text-color);
    font-size: 1.2rem;
    transition: all var(--transition-speed);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 2.5rem;
    width: 100%;
}

.profile-img-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #007bff, #00ff88);
    /* Subtle gradient border */
    box-shadow: var(--shadow);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--card-bg);
    /* Fallback */
    border: 3px solid var(--card-bg);
    /* Inner border */
}

.name {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Link Cards */
.links-section,
.payment-section,
.contact-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
    perspective: 1000px;
    /* For 3D effects if we want, or just cleanliness */
}

.link-card {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* Hover Effect: Scale up slightly and lift */
.link-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

/* Hover Effect: Color Branding */
/* Define brand colors */
.link-card.tiktok:hover {
    background-color: #000000;
    color: white;
}

.link-card.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.link-card.facebook:hover {
    background-color: #1877F2;
    color: white;
}

.link-card.whatsapp:hover {
    background-color: #25D366;
    color: white;
}

.link-card.youtube:hover {
    background-color: #FF0000;
    color: white;
}

.link-card.twitter:hover {
    background-color: #000000;
    color: white;
}

.link-card.telegram:hover {
    background-color: #0088cc;
    color: white;
}

.link-card.linkedin:hover {
    background-color: #0077b5;
    color: white;
}

.link-card.payment:hover {
    background-color: #2d3748;
    color: white;
}

/* Generic Dark Blue/Grey */
.link-card.email:hover {
    background-color: #ea4335;
    color: white;
}

/* =============================================
   LIVE CHAT BUTTON — Premium Animated Style
   ============================================= */

/* Override the generic .link-card base for livechat */
.link-card.livechat {
    background: linear-gradient(135deg, #1a7cdb, #6c3fc5, #1a7cdb);
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite, fadeIn 0.5s ease backwards;
    color: white !important;
    border: none;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 6px 24px rgba(26, 124, 219, 0.45);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

/* Animated gradient shift */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Shimmer sweep overlay */
.link-card.livechat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.18),
            transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        left: -75%;
    }

    100% {
        left: 130%;
    }
}

/* Pulsing outer glow */
.link-card.livechat::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    box-shadow: 0 0 0 0 rgba(26, 124, 219, 0.5);
    animation: glowPulse 2.5s ease-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(26, 124, 219, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(26, 124, 219, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(26, 124, 219, 0);
    }
}

/* Hover state */
.link-card.livechat:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 32px rgba(26, 124, 219, 0.55);
    background: linear-gradient(135deg, #1a7cdb, #6c3fc5, #1a7cdb);
    background-size: 200% 200%;
    color: white;
}

/* Icon wrapper with bounce */
.livechat-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin-right: 1rem;
    flex-shrink: 0;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.livechat-icon-wrap i {
    color: white !important;
    font-size: 1.3rem;
    margin: 0;
    width: auto;
}

/* Text block */
.livechat-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.livechat-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.livechat-sub {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
    font-weight: 400;
}

/* Live dot + LIVE badge */
.live-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #39ff84;
    border-radius: 50%;
    display: block;
    box-shadow: 0 0 6px #39ff84;
    animation: dotPulse 1.4s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
}

.live-label {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #39ff84;
    text-transform: uppercase;
}

/* Dark mode keeps same style (already high contrast) */
[data-theme="dark"] .link-card.livechat {
    box-shadow: 0 6px 28px rgba(26, 124, 219, 0.55);
}

/* Override generic hover icon color for livechat */
.link-card.livechat:hover i {
    color: white !important;
}



.link-card.website:hover {
    background-color: #007bff;
    color: white;
}

/* Dark mode specific overrides for black brands to ensure contrast if needed */
[data-theme="dark"] .link-card.tiktok:hover,
[data-theme="dark"] .link-card.twitter:hover {
    background-color: #ffffff;
    color: #000000;
}


.link-card i {
    font-size: 1.5rem;
    margin-right: 1.25rem;
    width: 24px;
    text-align: center;
    transition: color 0.3s;
}

/* Initial Icon Colors (Optional - keep them simple text-color or brand color) */
.tiktok i {
    color: var(--text-color);
}

.instagram i {
    color: #cc2366;
}

.facebook i {
    color: #1877F2;
}

.whatsapp i {
    color: #25D366;
}

.youtube i {
    color: #FF0000;
}

.twitter i {
    color: var(--text-color);
}

.telegram i {
    color: #0088cc;
}

.linkedin i {
    color: #0077b5;
}

.payment i {
    color: #09a5db;
}

/* Paystack blue-ish */
.email i {
    color: #ea4335;
}

.livechat i {
    color: #1a7cdb;
}

/* When hovering card, icon turns white */
.link-card:hover i {
    color: white !important;
    /* Force white on hover background */
}

[data-theme="dark"] .link-card:hover i {
    color: inherit;
    /* Inherit the white or black set by the card hover rule */
}

/* Special case for dark mode white hover */
[data-theme="dark"] .link-card.tiktok:hover i,
[data-theme="dark"] .link-card.twitter:hover i {
    color: #000000 !important;
}


.link-card span {
    flex-grow: 1;
    font-size: 1.05rem;
}

.arrow-icon {
    font-size: 0.9rem !important;
    opacity: 0.3;
    margin-right: 0 !important;
    transition: transform 0.3s;
}

.link-card:hover .arrow-icon {
    transform: translateX(4px);
    opacity: 0.8;
}

/* Section Headers */
h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-color);
    opacity: 0.5;
    margin-left: 0.5rem;
    font-weight: 600;
}

/* Footer */
footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.5;
}

/* Live Chat Container */
#live-chat-container {
    width: 100%;
    min-height: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.link-card {
    animation: fadeIn 0.5s ease backwards;
}

/* Stagger animation */
.link-card:nth-child(1) {
    animation-delay: 0.1s;
}

.link-card:nth-child(2) {
    animation-delay: 0.15s;
}

.link-card:nth-child(3) {
    animation-delay: 0.2s;
}

.link-card:nth-child(4) {
    animation-delay: 0.25s;
}

.link-card:nth-child(5) {
    animation-delay: 0.3s;
}

.link-card:nth-child(6) {
    animation-delay: 0.35s;
}


/* --- In-App Browser Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    animation: fadeInModal 0.3s forwards;
}

@keyframes fadeInModal {
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-align: center;
    width: 100%;
    max-width: 420px;
    /* Wider for better presence */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateY(20px);
    animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpModal {
    to {
        transform: translateY(0);
    }
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    color: var(--primary-color);
}

.modal-content h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    opacity: 1;
    letter-spacing: -0.5px;
}

.modal-content p {
    color: var(--text-color);
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.instructions {
    text-align: left;
    background: rgba(128, 128, 128, 0.08);
    padding: 1.25rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid rgba(128, 128, 128, 0.1);
}

.instructions p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    /* Align closer to top if multiline */
    gap: 10px;
}

.instructions p:last-child {
    margin-bottom: 0;
}

#close-modal-btn {
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, opacity 0.2s;
    width: 100%;
    /* Full width button on mobile feels better */
}

#close-modal-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

@media (max-width: 480px) {
    .container {
        padding: 2rem 1rem;
        padding-bottom: 6rem;
    }

    .name {
        font-size: 1.5rem;
    }

    /* On very small screens, reduce padding slightly */
    .modal-content {
        padding: 2rem 1.5rem;
    }
}

/* ==============================================
   CUSTOM CHAT POPUP
   ============================================== */

.chat-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 75vh;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(128, 128, 128, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.35s ease;
}

.chat-popup.is-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
    justify-content: center;
}

/* --- Header --- */
.chat-popup__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, #1a7cdb, #6c3fc5);
    color: white;
    flex-shrink: 0;
}

.chat-popup__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-popup__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.chat-popup__status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    background: #39ff84;
    border-radius: 50%;
    border: 2px solid white;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.chat-popup__info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.chat-popup__name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

.chat-popup__status-text {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 2px;
}

.chat-popup__close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.2s;
    flex-shrink: 0;
}

.chat-popup__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --- Messages --- */
.chat-popup__messages {
    flex: 0 0 auto;
    padding: 1.1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-color);
    scroll-behavior: smooth;
}

.chat-bubble {
    max-width: 82%;
    padding: 0.7rem 0.9rem;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.45;
    animation: bubbleIn 0.25s ease;
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Incoming (Heemanuel's bubble) */
.chat-bubble--in {
    background: var(--card-bg);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* Outgoing (user's bubble) */
.chat-bubble--out {
    background: linear-gradient(135deg, #1a7cdb, #6c3fc5);
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.chat-bubble p {
    margin: 0;
}

.chat-bubble__time {
    display: block;
    font-size: 0.68rem;
    opacity: 0.55;
    margin-top: 5px;
    text-align: right;
}

.chat-bubble--in .chat-bubble__time {
    text-align: left;
}

/* Typing indicator */
.typing-bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.7rem 1rem;
    background: var(--card-bg);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.typing-bubble span {
    width: 7px;
    height: 7px;
    background: var(--text-color);
    border-radius: 50%;
    opacity: 0.4;
    animation: typingDot 1.2s ease-in-out infinite;
}

.typing-bubble span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-bubble span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {

    0%,
    80%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    40% {
        transform: scale(1.4);
        opacity: 1;
    }
}

/* --- Input Area --- */
.chat-popup__input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(128, 128, 128, 0.1);
    background: var(--card-bg);
    flex-shrink: 0;
}

.chat-popup__input {
    flex-grow: 1;
    border: 1.5px solid rgba(128, 128, 128, 0.15);
    border-radius: 50px;
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--bg-color);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.chat-popup__input:focus {
    border-color: #1a7cdb;
}

.chat-popup__input::placeholder {
    color: rgba(128, 128, 128, 0.6);
}

.chat-popup__send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #1a7cdb, #6c3fc5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.2s, opacity 0.2s;
}

.chat-popup__send:hover {
    transform: scale(1.1);
}

.chat-popup__send:active {
    transform: scale(0.95);
}

/* --- Live Chat CTA button inside popup --- */
.chat-cta {
    padding: 0.6rem 1rem 0;
    flex-shrink: 0;
}

.chat-cta__btn {
    width: 100%;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, #1a7cdb, #6c3fc5);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
}

.chat-cta__btn:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

.chat-cta__btn:active {
    transform: scale(0.98);
}

/* --- Footer note --- */
.chat-popup__footer {
    text-align: center;
    font-size: 0.7rem;
    padding: 0.4rem;
    opacity: 0.45;
    background: var(--card-bg);
    margin: 0;
    flex-shrink: 0;
}

/* --- Mobile: bottom sheet, exactly half screen --- */
@media (max-width: 480px) {
    .chat-popup {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        height: 50vh;
        max-height: 50vh;
        border-radius: 24px 24px 0 0;
        /* Slide from bottom only — no scale on mobile */
        transform: translateY(100%);
        opacity: 1;
    }

    .chat-popup.is-open {
        transform: translateY(0);
        opacity: 1;
    }

    /* Prevent iOS Safari from zooming on input focus */
    .chat-popup__input {
        font-size: 16px;
    }
}