/* Non-blocking floating PDPA Cookie Notice (hidden by default to prevent flash) */
.cookie-overlay {
    position: fixed;
    inset: 0;
    padding: 16px;
    display: none;
    justify-content: center;
    align-items: flex-end;
    background-color: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(2px);
    z-index: 9999;
    pointer-events: none;
}

.cookie-overlay.is-visible {
    display: flex;
    animation: cookieFadeIn 0.2s ease-out forwards;
}

@keyframes cookieFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.cookie-consent-box {
    pointer-events: auto;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.22);
    padding: 20px 24px;
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    text-align: left;
    font-family: inherit;
    animation: cookieSlideUp 0.25s ease-out forwards;
}

.cookie-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.cookie-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background-color: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cookie-icon svg {
    width: 20px;
    height: 20px;
}

.cookie-consent-box h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    line-height: 1.35;
}

.cookie-subtitle {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
}

.cookie-desc {
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.6;
    margin: 0 0 14px 0;
}

.cookie-details {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.cookie-detail-item {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.5;
}

.cookie-detail-item p {
    margin: 4px 0 0 0;
}

.cookie-detail-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 600;
    color: #1e293b;
}

.cookie-badge-required {
    font-size: 0.7rem;
    font-weight: 600;
    color: #047857;
    background-color: #d1fae5;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.cookie-badge-optional {
    font-size: 0.7rem;
    font-weight: 600;
    color: #1d4ed8;
    background-color: #dbeafe;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.cookie-link-btn {
    background: none;
    border: none;
    padding: 4px 0;
    font-size: 0.825rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    text-align: left;
    align-self: flex-start;
}

.cookie-link-btn:hover {
    color: #1d4ed8;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.button-container button {
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.button-container .decline-btn {
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.button-container .decline-btn:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.button-container .accept-btn {
    background-color: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.button-container .accept-btn:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

@media (min-width: 640px) {
    .cookie-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .cookie-link-btn {
        align-self: center;
    }

    .button-container {
        flex-direction: row;
    }
}
