/* Custom App Download Popup Styling */

:root {
    --tantika-primary: #8E1B29; /* Brand Maroon/Red */
    --tantika-text-dark: #222222;
    --tantika-text-muted: #555555;
    --tantika-text-light: #777777;
    --tantika-bg-cream: #fbefed; /* Sampled background color */
    --tantika-border: #D5C2B2;
    --tantika-white: #ffffff;
}

/* Modal Overlay */
.tantika-app-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Hide popup on Desktop screens (> 1024px) - Only show on Tablets & Mobiles */
@media (min-width: 1025px) {
    .tantika-app-popup-overlay {
        display: none !important;
    }
}

.tantika-app-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.tantika-app-popup-container {
    width: 90%;
    max-width: 720px;
    height: 820px;
    max-height: 92vh;
    border-radius: 28px;
    background: var(--tantika-white);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tantika-app-popup-overlay.active .tantika-app-popup-container {
    transform: scale(1) translateY(0);
}

/* Dismissing state for close animation */
.tantika-app-popup-overlay.dismissing {
    opacity: 0;
}

.tantika-app-popup-overlay.dismissing .tantika-app-popup-container {
    transform: scale(0.95) translateY(10px);
}

/* Close Button */
.tantika-app-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--tantika-white);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 100;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    color: var(--tantika-text-dark);
    padding: 0;
}

.tantika-app-popup-close:hover {
    background: #f5f5f5;
    transform: scale(1.05) rotate(90deg);
    color: var(--tantika-primary);
}

.tantika-app-popup-close svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Popup Body (Desktop) */
.tantika-app-popup-body {
    flex: 1;
    display: flex;
    background: var(--tantika-bg-cream) url('images/App-Popup-bg.png') no-repeat left top;
    background-size: 100% 100%;
    position: relative;
    overflow: hidden;
}

/* Spacer for left side phone mockup */
.tantika-app-popup-left-space {
    width: 48%;
    flex-shrink: 0;
}

/* Content Area (Right side) */
.tantika-app-popup-content {
    width: 52%;
    padding: 135px 35px 30px 5px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Mobile logo (hidden on desktop) */
.tantika-app-popup-mobile-logo {
    display: none;
}

/* Typography & Headline */
.tantika-app-popup-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 2px;
}

.tantika-app-popup-pretitle {
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: 21px;
    color: var(--tantika-text-dark);
    line-height: 1.2;
    font-weight: 500;
}

.tantika-app-popup-main-title {
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: 40px;
    color: var(--tantika-primary);
    font-weight: 700;
    margin: 2px 0 10px 0;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.tantika-app-popup-subtitle {
    font-size: 13.5px;
    color: var(--tantika-text-muted);
    line-height: 1.45;
    margin: 0 0 20px 0;
    font-family: inherit;
}

.tantika-text-highlight {
    color: var(--tantika-primary);
    font-weight: 700;
}

/* Features List Container */
.tantika-app-popup-features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

/* Vertical Dashed Line */
.tantika-app-popup-features-list::before {
    content: '';
    position: absolute;
    left: 21px; /* Centered with the 42px outer ring */
    top: 20px;
    bottom: 20px;
    width: 1px;
    border-left: 1.5px dashed var(--tantika-border);
    z-index: 1;
}

/* Individual Feature Item */
.tantika-app-popup-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

/* Outer Ring */
.tantika-app-popup-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--tantika-border);
    background: var(--tantika-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

/* Inner Maroon Circle */
.tantika-app-popup-feature-icon-inner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tantika-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tantika-app-popup-feature-icon-inner svg {
    width: 15px;
    height: 15px;
    fill: var(--tantika-white);
}

/* Feature Texts */
.tantika-app-popup-feature-text h4 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--tantika-text-dark);
}

.tantika-app-popup-feature-text p {
    margin: 1px 0 0 0;
    font-size: 12px;
    color: var(--tantika-text-light);
    line-height: 1.35;
}

/* Action Section: Button & Cursive arrow */
.tantika-app-popup-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.tantika-app-popup-play-btn {
    display: inline-block;
    width: 160px;
    height: auto;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tantika-app-popup-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(142, 27, 41, 0.15);
}

.tantika-app-popup-play-btn svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Arrow + Download Now script wrapper */
.tantika-app-popup-arrow-cta {
    width: 170px;
    height: 50px;
}

.tantika-app-popup-arrow-svg {
    width: 100%;
    height: 100%;
}

/* Footer Section */
.tantika-app-popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #FAF6F2;
    border-top: 1px solid #EFEAE3;
    box-sizing: border-box;
}

.tantika-app-popup-footer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.tantika-app-popup-footer-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tantika-app-popup-footer-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--tantika-primary);
}

.tantika-app-popup-footer-text {
    display: flex;
    flex-direction: column;
}

.tantika-app-popup-footer-text strong {
    font-size: 11.5px;
    color: var(--tantika-text-dark);
    font-weight: 700;
}

.tantika-app-popup-footer-text span {
    font-size: 10px;
    color: var(--tantika-text-light);
    margin-top: 1px;
}

.tantika-app-popup-footer-divider {
    width: 1px;
    height: 26px;
    background: #E5DCD0;
    margin: 0 8px;
    flex-shrink: 0;
}

/* Responsive - Adjustments for smaller desktops */
@media (max-height: 840px) and (min-width: 577px) {
    .tantika-app-popup-container {
        height: 720px;
    }
    .tantika-app-popup-content {
        padding-top: 100px;
    }
    .tantika-app-popup-pretitle {
        font-size: 19px;
    }
    .tantika-app-popup-main-title {
        font-size: 34px;
        margin-bottom: 6px;
    }
    .tantika-app-popup-subtitle {
        margin-bottom: 15px;
    }
}

@media (max-height: 720px) and (min-width: 577px) {
    .tantika-app-popup-container {
        height: 640px;
    }
    .tantika-app-popup-content {
        padding-top: 80px;
    }
    .tantika-app-popup-pretitle {
        font-size: 17px;
    }
    .tantika-app-popup-main-title {
        font-size: 28px;
    }
    .tantika-app-popup-features-list {
        gap: 8px;
    }
    .tantika-app-popup-feature-icon {
        width: 36px;
        height: 36px;
    }
    .tantika-app-popup-feature-icon-inner {
        width: 28px;
        height: 28px;
    }
    .tantika-app-popup-feature-icon-inner svg {
        width: 13px;
        height: 13px;
    }
    .tantika-app-popup-features-list::before {
        left: 18px;
    }
}

/* Responsive - Scale Entire Popup for Mobile Viewports */
@media (max-width: 750px) {
    .tantika-app-popup-container {
        width: 350px !important;
        height: 780px !important;
        max-height: 94vh !important;
        max-width: 95vw !important;
        /* Scale down the entire popup container to fit the viewport width or height */
        transform: scale(calc(min(90vw, 90vh) / 350)) !important;
        transform-origin: center center !important;
        border-radius: 24px !important;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3) !important;
    }

    .tantika-app-popup-overlay {
        align-items: center !important; /* Center the scaled popup card on mobile */
        overflow: hidden !important;
    }

    .tantika-app-popup-body {
        /* Use the mobile background image provided by the user! */
        background: var(--tantika-bg-cream) url('images/popup_mobile_bg.png') no-repeat center top !important;
        background-size: 100% 100% !important;
        padding: 0 !important;
        flex-direction: column !important;
    }

    .tantika-app-popup-left-space {
        display: none !important;
    }

    .tantika-app-popup-content {
        width: 90% !important;
        margin: 125px auto 25px auto !important; /* Position perfectly below the background logo and above the bottom draping */
        background: rgba(253, 251, 249, 0.92) !important; /* Semi-transparent warm cream to match theme */
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border-radius: 20px !important;
        padding: 20px 15px 15px 15px !important;
        box-sizing: border-box !important;
        border: 1px solid rgba(255, 255, 255, 0.7) !important;
        box-shadow: 0 15px 30px rgba(142, 27, 41, 0.08) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .tantika-app-popup-header {
        text-align: center !important;
        align-items: center !important;
    }

    .tantika-app-popup-pretitle {
        font-size: 15px !important;
        color: var(--tantika-text-dark) !important;
    }

    .tantika-app-popup-main-title {
        font-size: 26px !important;
        color: var(--tantika-primary) !important;
        margin: 2px 0 4px 0 !important;
    }

    .tantika-app-popup-subtitle {
        text-align: center !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        padding: 0 10px !important;
        margin-bottom: 12px !important;
    }

    /* Features List Compact styling */
    .tantika-app-popup-features-list {
        max-width: 280px !important;
        margin: 0 auto 12px auto !important;
        gap: 8px !important;
    }

    .tantika-app-popup-features-list::before {
        left: 14px !important; /* Align with scaled 28px icon */
        top: 14px !important;
        bottom: 14px !important;
    }

    .tantika-app-popup-feature-icon {
        width: 28px !important;
        height: 28px !important;
    }

    .tantika-app-popup-feature-icon-inner {
        width: 22px !important;
        height: 22px !important;
    }

    .tantika-app-popup-feature-icon-inner svg {
        width: 10px !important;
        height: 10px !important;
    }

    .tantika-app-popup-feature-text h4 {
        font-size: 13px !important;
    }

    .tantika-app-popup-feature-text p {
        font-size: 10.5px !important;
        margin-top: 0 !important;
        line-height: 1.3 !important;
    }

    /* Actions area vertical stacking inside the card */
    .tantika-app-popup-actions-wrapper {
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        margin-top: 4px !important;
        width: 100% !important;
    }

    .tantika-app-popup-play-btn {
        width: 130px !important;
    }

    .tantika-app-popup-arrow-cta {
        width: 135px !important;
        height: 36px !important;
        margin-top: -3px !important;
    }

    .tantika-app-popup-footer {
        display: none !important; /* Hide footer on mobile */
    }
}



