/**
 * Hai UAE - Cookie Consent Banner & Preferences Modal Stylesheet
 * Responsive, accessible, and tokenized with Brand Yellow accents
 */

.hai-cookie-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    max-width: 480px;
    width: calc(100% - 48px);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
    box-sizing: border-box;
}

.hai-cookie-banner *,
.hai-cookie-banner *::before,
.hai-cookie-banner *::after {
    box-sizing: border-box;
}

.hai-cookie-banner.hai-cookie-show {
    opacity: 1;
    transform: translateY(0);
}

.hai-cookie-card {
    background: #ffffff;
    color: var(--ink, #0f172a);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16), 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 20px 22px;
    overflow: hidden;
}

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

.hai-cookie-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hai-cookie-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #fff8d6;
    color: #b8860b;
    flex-shrink: 0;
}

.hai-cookie-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink, #0f172a);
    line-height: 1.3;
}

.hai-cookie-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--subtle, #94a3b8);
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.hai-cookie-close:hover {
    color: var(--ink, #0f172a);
}

.hai-cookie-body {
    margin-bottom: 16px;
}

.hai-cookie-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text, #334155);
    margin: 0 0 10px 0;
}

.hai-cookie-details {
    background: #f9fafb;
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hai-cookie-group {
    padding: 4px 0;
}

.hai-cookie-group:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

.hai-cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    margin: 0;
}

.hai-cookie-option input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    accent-color: var(--brand, #ffcb05);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.hai-cookie-opt-text strong {
    display: block;
    color: var(--ink, #0f172a);
    font-size: 13px;
    font-weight: 600;
}

.hai-cookie-opt-text small {
    display: block;
    color: var(--muted, #64748b);
    font-size: 11.5px;
    line-height: 1.4;
    margin-top: 2px;
}

.hai-cookie-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hai-cookie-links {
    font-size: 12px;
    color: var(--muted, #64748b);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.hai-cookie-links a {
    color: var(--text, #334155);
    text-decoration: underline;
    transition: color 0.15s ease;
}

.hai-cookie-links a:hover {
    color: var(--ink, #0f172a);
}

.hai-cookie-sep {
    color: #cbd5e1;
}

.hai-cookie-link-btn {
    background: none;
    border: none;
    color: var(--link, #1d4ed8);
    text-decoration: underline;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

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

.hai-cookie-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.hai-cookie-actions .hai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1px solid transparent;
    text-decoration: none;
    line-height: 1.3;
}

.hai-cookie-actions .hai-btn-primary {
    background: var(--brand, #ffcb05);
    color: var(--on-brand, #0f172a);
    border-color: var(--brand, #ffcb05);
}

.hai-cookie-actions .hai-btn-primary:hover {
    background: var(--brand-hover, #e6b700);
    color: #000000;
}

.hai-cookie-actions .hai-btn-secondary {
    background: #f3f4f6;
    color: var(--text, #334155);
    border-color: var(--border-light, #e2e8f0);
}

.hai-cookie-actions .hai-btn-secondary:hover {
    background: #e2e8f0;
    color: var(--ink, #0f172a);
}

@media (max-width: 767.98px) {
    .hai-cookie-banner {
        bottom: calc(var(--dir-mobile-nav-height, 62px) + env(safe-area-inset-bottom, 0px) + 12px) !important;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
    .hai-cookie-card {
        padding: 16px 16px;
    }
    .hai-cookie-actions {
        flex-direction: column-reverse;
        width: 100%;
        gap: 8px;
    }
    .hai-cookie-actions .hai-btn {
        width: 100%;
    }
}

