/**
 * Maintainer - Cookie Consent & Privacy Protection Styles
 * Compliant with DPDP Act, 2023 principles.
 */

/* ══════════════════════════════════════════════════════════════
   1. FLOATING LANDING PAGE BANNER
   ══════════════════════════════════════════════════════════════ */
.cc-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 460px;
    width: calc(100% - 32px);
    background: rgba(7, 26, 52, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(225, 172, 34, 0.35);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 4px 14px rgba(0, 0, 0, 0.2);
    z-index: 99998;
    color: #f8fafc;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transform: translateY(120%) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.cc-banner.cc-show {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.cc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(225, 172, 34, 0.15);
    border: 1px solid rgba(225, 172, 34, 0.35);
    color: #facc15;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.cc-badge svg {
    width: 14px;
    height: 14px;
}

.cc-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.cc-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.cc-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.cc-desc {
    font-size: 0.84rem;
    color: #cbd5e1;
    line-height: 1.55;
    margin-bottom: 14px;
}

.cc-desc strong {
    color: #f8fafc;
    font-weight: 600;
}

/* Accordion / Details for Privacy Details */
.cc-details-box {
    margin-bottom: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

.cc-details-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #e1ac22;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.cc-details-summary:hover {
    color: #fde047;
    text-decoration: underline;
}

.cc-details-content {
    display: none;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cc-details-content ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

.cc-details-content li {
    margin-bottom: 4px;
}

.cc-details-content.open {
    display: block;
    animation: ccFadeIn 0.25s ease-out;
}

/* Button Row */
.cc-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.cc-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.cc-btn-reject {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.cc-btn-reject:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.cc-btn-accept {
    background: #e1ac22;
    color: #071a34;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(225, 172, 34, 0.35);
}

.cc-btn-accept:hover {
    background: #f1b92c;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(225, 172, 34, 0.45);
}

.cc-btn:active {
    transform: scale(0.98);
}


/* ══════════════════════════════════════════════════════════════
   2. MANDATORY COOKIE CONSENT MODAL (SIGNUP PAGE)
   ══════════════════════════════════════════════════════════════ */
.cc-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(4, 14, 29, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    padding: 20px 14px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cc-modal-backdrop.cc-show {
    opacity: 1;
    pointer-events: auto;
}

.cc-modal-card {
    background: #071a34;
    border: 1px solid rgba(225, 172, 34, 0.4);
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    padding: 30px 26px 26px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(225, 172, 34, 0.12);
    color: #f8fafc;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transform: scale(0.92) translateY(15px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-sizing: border-box;
    margin: auto; /* Centers when space allows; starts at top when taller than viewport */
    max-height: calc(100dvh - 36px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cc-modal-card::-webkit-scrollbar {
    width: 5px;
}
.cc-modal-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
}
.cc-modal-card::-webkit-scrollbar-thumb {
    background: rgba(225, 172, 34, 0.45);
    border-radius: 9999px;
}

.cc-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

.cc-modal-backdrop.cc-show .cc-modal-card {
    transform: scale(1) translateY(0);
}

.cc-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 9999px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.cc-modal-badge svg {
    width: 15px;
    height: 15px;
}

.cc-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.cc-modal-lead {
    font-size: 0.92rem;
    color: #e2e8f0;
    line-height: 1.55;
    margin-bottom: 16px;
}

.cc-modal-lead strong {
    color: #e1ac22;
}

.cc-why-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 0.83rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.cc-why-title {
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cc-why-list {
    margin: 0;
    padding-left: 20px;
}

.cc-why-list li {
    margin-bottom: 6px;
}

.cc-why-list li:last-child {
    margin-bottom: 0;
}

.cc-why-list strong {
    color: #f1f5f9;
}

.cc-promise-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.45;
    margin-bottom: 22px;
    padding: 8px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 8px;
}

.cc-promise-note svg {
    width: 18px;
    height: 18px;
    color: #34d399;
    flex-shrink: 0;
    margin-top: 1px;
}

.cc-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cc-btn-accept-mandatory {
    flex: 1.4;
    padding: 12px 20px;
    background: #e1ac22;
    color: #071a34;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 18px rgba(225, 172, 34, 0.4);
}

.cc-btn-accept-mandatory:hover {
    background: #f1b92c;
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(225, 172, 34, 0.5);
}

.cc-btn-cancel-mandatory {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cc-btn-cancel-mandatory:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Modal Shake Effect on attempt to bypass */
.cc-shake {
    animation: ccShake 0.4s ease-in-out;
}

@keyframes ccShake {
    0%, 100% { transform: scale(1) translateX(0); }
    20%, 60% { transform: scale(1) translateX(-6px); }
    40%, 80% { transform: scale(1) translateX(6px); }
}

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

/* Responsive adjustments */
@media (max-width: 600px) {
    .cc-banner {
        bottom: 12px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: calc(100% - 24px);
        padding: 14px 14px;
        border-radius: 14px;
        max-height: calc(100dvh - 24px);
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }

    .cc-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .cc-btn {
        width: 100%;
        padding: 10px 14px;
    }

    .cc-modal-backdrop {
        padding: 12px 10px;
    }

    .cc-modal-card {
        padding: 16px 14px 14px;
        border-radius: 16px;
        max-width: 100%;
        max-height: calc(100dvh - 20px);
        max-height: calc(100vh - 20px);
    }

    .cc-modal-close {
        top: 12px;
        right: 12px;
    }

    .cc-modal-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
        margin-bottom: 6px;
        gap: 5px;
    }

    .cc-modal-badge svg {
        width: 12px;
        height: 12px;
    }

    .cc-modal-title {
        font-size: 1.05rem;
        margin-bottom: 6px;
        line-height: 1.25;
        letter-spacing: -0.2px;
        padding-right: 24px; /* avoid close btn overlap */
    }

    .cc-modal-lead {
        font-size: 0.79rem;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .cc-why-box {
        padding: 8px 10px;
        margin-bottom: 8px;
        font-size: 0.74rem;
        line-height: 1.4;
        border-radius: 9px;
    }

    .cc-why-title {
        font-size: 0.76rem;
        margin-bottom: 5px;
        gap: 5px;
    }

    .cc-why-title svg {
        width: 13px;
        height: 13px;
    }

    .cc-why-list {
        padding-left: 14px;
    }

    .cc-why-list li {
        margin-bottom: 3px;
    }

    .cc-promise-note {
        padding: 6px 9px;
        margin-bottom: 10px;
        font-size: 0.72rem;
        line-height: 1.35;
        gap: 7px;
        border-radius: 7px;
    }

    .cc-promise-note svg {
        width: 14px;
        height: 14px;
    }

    .cc-modal-actions {
        display: flex;
        flex-direction: row;
        gap: 8px;
    }

    .cc-btn-accept-mandatory {
        flex: 1.35;
        padding: 10px 12px;
        font-size: 0.84rem;
        border-radius: 8px;
        white-space: nowrap;
    }

    .cc-btn-cancel-mandatory {
        flex: 1;
        padding: 10px 10px;
        font-size: 0.79rem;
        border-radius: 8px;
        white-space: nowrap;
    }
}

/* Extra compact screens or landscape mobile */
@media (max-height: 640px) {
    .cc-modal-backdrop {
        padding: 8px 10px;
    }
    .cc-modal-card {
        padding: 14px 14px 14px;
        max-height: calc(100dvh - 16px);
        max-height: calc(100vh - 16px);
    }
    .cc-modal-badge {
        margin-bottom: 6px;
        font-size: 0.7rem;
    }
    .cc-modal-title {
        font-size: 1.02rem;
        margin-bottom: 6px;
    }
    .cc-modal-lead {
        font-size: 0.78rem;
        margin-bottom: 8px;
    }
    .cc-why-box {
        padding: 8px 10px;
        margin-bottom: 8px;
        font-size: 0.74rem;
    }
    .cc-promise-note {
        margin-bottom: 10px;
        padding: 6px 8px;
        font-size: 0.72rem;
    }
}
