/* ========================================================
   AskFoxy - Dedicated License & Subscription Stylesheet
   ======================================================== */

:root {
    --primary-orange: #f39c12;
    --primary-dark: #d35400;
    --primary-amber: #e67e22;
    --bg-sky: #74b9ff;
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --accent-green: #10b981;
    --accent-blue: #0284c7;
    --accent-purple: #8b5cf6;
    --border-light: #e2e8f0;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-float: 0 8px 20px -4px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Fredoka', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #74b9ff 0%, #a29bfe 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-height, 100dvh);
    display: flex;
    flex-direction: column;
    padding: 16px 12px max(16px, env(safe-area-inset-bottom, 0px), var(--safe-bottom, 0px));
}

/* Top Sticky Navigation Bar */
.license-nav {
    position: sticky;
    top: 10px;
    z-index: 100;
    max-width: 880px;
    width: 100%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid #ffd700;
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    box-shadow: var(--shadow-float);
    gap: 12px;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff8e7;
    color: var(--primary-dark);
    border: 2px solid var(--primary-orange);
    border-radius: 24px;
    padding: 8px 16px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.btn-back-home:hover {
    background: var(--primary-orange);
    color: #ffffff;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 16px rgba(243, 156, 18, 0.3);
}

.btn-back-home:active {
    transform: scale(0.96);
}

.license-nav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #2f3542;
    white-space: nowrap;
}

.license-nav-title i {
    color: var(--primary-orange);
    font-size: 1.3rem;
}

.nav-shortcut-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    color: #475569;
    border: 1.5px solid var(--border-light);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-shortcut-btn:hover {
    background: #ffffff;
    border-color: var(--primary-orange);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Main Container */
.license-container {
    max-width: 880px;
    width: 100%;
    margin: 0 auto 20px;
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 0 1 auto;
}

/* Top Sub-tabs */
.license-subnav-bar {
    display: flex;
    gap: 8px;
    background: #f1f2f6;
    padding: 4px;
    border-radius: 14px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-sizing: border-box;
}

.license-subnav-bar::-webkit-scrollbar {
    display: none;
}

.license-subtab-btn {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #57606f;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-family: inherit;
    white-space: nowrap;
}

.tab-label-short {
    display: none !important;
}

.tab-label-full {
    display: inline !important;
}

.license-subtab-btn i {
    font-size: 0.92rem;
    color: #747d8c;
    transition: color 0.2s ease, transform 0.2s ease;
}

.license-subtab-btn:hover {
    color: #d35400;
}

.license-subtab-btn:hover i {
    color: #f39c12;
    transform: scale(1.1);
}

.license-subtab-btn.active {
    background: #ffffff;
    color: #d35400;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.license-subtab-btn.active i {
    color: #d35400;
}

.license-subpanel {
    display: none;
    animation: tabFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.license-subpanel.active {
    display: block;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Info Box / License Details */
.info-box {
    background: #fffdf5;
    border: 1.5px solid #ffeaa7;
    border-radius: 18px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-box-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #f1f2f6;
    font-size: 0.92rem;
}

.info-box-row:last-child {
    border-bottom: none;
}

.info-box-row strong {
    color: #2f3542;
    font-weight: 700;
}

.info-box-row span,
.info-box-row code {
    color: #57606f;
    font-weight: 600;
}

.status-badge-active {
    background: #e8f8f0;
    color: #27ae60;
    border: 1px solid #2ecc71;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}

.status-badge-trial {
    background: #fff8e7;
    color: #d35400;
    border: 1px solid #ffd700;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}

.btn-copy-code {
    background: #f1f2f6;
    border: 1px solid #ced6e0;
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 0.76rem;
    cursor: pointer;
    margin-left: 6px;
    transition: all 0.15s;
}

.btn-copy-code:hover {
    background: var(--primary-orange);
    color: #ffffff;
    border-color: var(--primary-orange);
}

/* Settings Cards & Form Controls */
.settings-card {
    background: #fffdf5;
    border: 1px solid #ffeaa7;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #2f3542;
}

.form-group input {
    padding: 10px 14px;
    border: 2px solid #ffd700;
    border-radius: 12px;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
    background: #ffffff;
}

.form-group input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #1dd1a1, #10ac84);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(29, 209, 161, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 11px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-danger:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* ==========================================================================
   Subscription Plans Carousel & Cards
   ========================================================================== */
.plans-email-bar {
    background: #fffdf9;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plans-email-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #d35400;
    display: flex;
    align-items: center;
    gap: 6px;
}

.plans-email-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.plans-email-inputs input {
    padding: 8px 12px;
    font-size: 0.88rem;
    border-radius: 8px;
    border: 1px solid #ced6e0;
    outline: none;
    font-family: inherit;
}

.plans-email-inputs input[type="email"] {
    flex: 2;
    min-width: 180px;
}

.plans-email-inputs input[type="text"] {
    flex: 1;
    min-width: 130px;
}

.plans-choice-nav {
    display: flex;
    gap: 6px;
    background: #f1f2f6;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.plan-choice-pill {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #57606f;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    white-space: nowrap;
    font-family: inherit;
}

.plan-choice-pill:hover {
    color: #e67e22;
}

.plan-choice-pill.active {
    background: #ffffff;
    color: #d35400;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.plans-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden !important;
}

.plans-scroll-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px 14px;
    scrollbar-width: none !important;
}

.plans-scroll-track::-webkit-scrollbar {
    display: none !important;
}

.plan-card {
    flex: 0 0 260px;
    max-width: 86%;
    padding: 16px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    position: relative;
}

.plan-card.plan-featured {
    border-color: #f39c12;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.18);
}

.plan-card.plan-pro {
    border-color: #8b5cf6;
}

.plan-badge-top {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 8px;
    background: #f1f2f6;
    color: #475569;
    align-self: flex-start;
}

.plan-badge-popular {
    background: #fef3c7;
    color: #b45309;
}

.plan-badge-pro {
    background: #ede9fe;
    color: #6d28d9;
}

.plan-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.plan-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: #d35400;
    margin-bottom: 12px;
}

.plan-price .price-period {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
}

.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.84rem;
    color: #475569;
    margin-bottom: 16px;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.35;
}

.plan-features .check-icon {
    color: #10b981;
    font-size: 0.88rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.plan-notice-box {
    background: #fff8e7;
    border: 1px solid #ffd79a;
    border-radius: 8px;
    padding: 8px;
    font-size: 0.74rem;
    color: #92400e;
    line-height: 1.35;
    margin-bottom: 12px;
}

.btn-plan-action {
    width: 100%;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-plan-current {
    background: #e2e8f0;
    color: #64748b;
    cursor: default;
}

.btn-pro-action {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #ffffff;
}

.btn-pro-action:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #ffd79a;
    color: #e67e22;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.carousel-arrow:hover {
    background: #fff8e7;
    color: #d35400;
    transform: translateY(-50%) scale(1.08);
}

.carousel-arrow.carousel-prev { left: 4px; }
.carousel-arrow.carousel-next { right: 4px; }

.plans-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: #dcdde1;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.carousel-dot.active {
    width: 22px;
    background: var(--primary-orange);
}

/* ========================================================
   Application Footer (VAapps Brand & Version Attribution)
   ======================================================== */
.app-footer {
    text-align: center;
    padding: 6px 16px;
    margin-top: auto;
    margin-bottom: max(12px, env(safe-area-inset-bottom, 0px), var(--safe-bottom, 0px));
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    z-index: 10;
}

.footer-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 0.72rem;
    color: #475569;
}

.vaapps-link {
    color: #4338ca;
    text-decoration: none;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.76rem;
    transition: transform 0.2s ease;
}

.vaapps-link:hover {
    transform: translateY(-1px);
}

.footer-brand {
    font-weight: 800;
    color: #4338ca;
    letter-spacing: -0.2px;
    font-size: 0.78rem;
}

.footer-by {
    font-weight: 600;
    color: #6366f1;
    font-size: 0.72rem;
}

.footer-vaapps {
    font-weight: 800;
    color: #4338ca;
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    letter-spacing: -0.2px;
    font-size: 0.78rem;
}

.footer-vaapps::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1.8px;
    border-radius: 2px;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 25%, #d946ef 50%, #ec4899 75%, #4f46e5 100%);
    background-size: 200% 100%;
    animation: vaappsGradientSlide 3s linear infinite;
    box-shadow: 0 1px 4px rgba(124, 58, 237, 0.45);
}

.vaapps-link:hover .footer-vaapps::after {
    height: 2.2px;
    box-shadow: 0 2px 8px rgba(217, 70, 239, 0.6);
}

@keyframes vaappsGradientSlide {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.footer-sep {
    color: #94a3b8;
    font-size: 0.70rem;
    user-select: none;
}

.footer-version {
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.65rem;
    letter-spacing: 0.3px;
    border: 1px solid rgba(211, 84, 0, 0.25);
    box-shadow: 0 1px 4px rgba(230, 126, 34, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.footer-copy {
    color: #64748b;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 10px 8px max(14px, env(safe-area-inset-bottom, 0px), var(--safe-bottom, 0px));
    }

    .license-nav {
        padding: 8px 12px;
        flex-wrap: wrap;
    }

    .license-container {
        padding: 16px;
        border-radius: 18px;
        margin: 0 auto 16px;
    }

    .license-subnav-bar {
        padding: 4px;
        gap: 4px;
        border-radius: 12px;
    }

    .license-subtab-btn {
        padding: 8px 6px;
        font-size: 0.80rem;
        gap: 5px;
        border-radius: 8px;
    }

    .license-subtab-btn i {
        font-size: 0.84rem;
    }

    .tab-label-full {
        display: none !important;
    }

    .tab-label-short {
        display: inline !important;
    }

    .plan-card {
        flex: 0 0 240px;
    }

    .app-footer {
        padding: 6px 14px;
        margin-top: auto;
        margin-bottom: max(10px, env(safe-area-inset-bottom, 0px), var(--safe-bottom, 0px));
        border-radius: 16px;
        max-width: 95%;
    }

    .footer-content {
        font-size: 0.76rem;
        gap: 6px;
    }

    .vaapps-link {
        font-size: 0.82rem;
    }

    .footer-brand,
    .footer-vaapps {
        font-size: 0.86rem;
    }

    .footer-version {
        font-size: 0.66rem;
        padding: 1px 6px;
    }
}
