/* ===================================
   HireUp Cookie Consent Styles
   =================================== */

.cookie-consent {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 640px);
    max-height: min(90vh, 620px);
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(16px);
    border-radius: 1.5rem;
    box-shadow: 0 25px 65px -25px rgba(15, 23, 42, 0.6);
    padding: 1.5rem 1.5rem 1.35rem;
    color: #f8fafc;
    z-index: 10000;
    display: none;
    animation: cookieFadeIn 0.4s ease;
    overflow: hidden;
}

.cookie-consent.show {
    display: flex;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.cookie-text {
    font-size: 1rem;
    line-height: 1.65;
    color: #e2e8f0;
    margin: 0;
}

.cookie-text strong {
    color: #ffffff;
}

.cookie-details-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: #93c5fd;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
}

.cookie-details-toggle:hover,
.cookie-details-toggle:focus-visible {
    color: #bfdbfe;
    text-decoration: underline;
}

.cookie-details {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 1.25rem;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    max-height: min(52vh, 360px);
    overflow-y: auto;
    padding-right: 0.35rem;
}

.cookie-details[hidden] {
    display: none !important;
}

.cookie-details p {
    margin: 0;
    color: #cbd5f5;
    line-height: 1.65;
    font-size: 0.95rem;
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.65);
    border-radius: 1rem;
    border: 1px solid rgba(100, 116, 139, 0.35);
}

.cookie-option-content h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.cookie-option-content p {
    margin: 0;
    color: #cbd5f5;
    font-size: 0.9rem;
}

.cookie-option-status {
    font-weight: 600;
    font-size: 0.85rem;
    color: #fbbf24;
    white-space: nowrap;
}

.cookie-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-flex;
    align-items: center;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: rgba(148, 163, 184, 0.5);
    border-radius: 999px;
    transition: background-color 0.25s ease;
}

.cookie-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ffffff;
    transition: transform 0.25s ease;
}

.cookie-toggle input:checked + .cookie-toggle-track {
    background-color: #38bdf8;
}

.cookie-toggle input:checked + .cookie-toggle-track .cookie-toggle-thumb {
    transform: translateX(22px);
}

.cookie-policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cookie-policy-links a {
    color: #93c5fd;
    text-decoration: underline;
    font-size: 0.9rem;
}

.cookie-policy-links a:hover,
.cookie-policy-links a:focus-visible {
    color: #bfdbfe;
}

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.cookie-btn {
    border-radius: 999px;
    padding: 0.7rem 1.6rem;
    font-weight: 600;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.cookie-btn:hover,
.cookie-btn:focus-visible {
    transform: translateY(-1px);
}

.cookie-btn.primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
}

.cookie-btn.secondary {
    background: rgba(148, 163, 184, 0.15);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.cookie-btn.tertiary {
    background: none;
    color: #93c5fd;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.cookie-btn.quiet {
    background: rgba(59, 130, 246, 0.12);
    color: #bfdbfe;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.cookie-save-wrapper {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .cookie-consent {
        bottom: 0.75rem;
        width: calc(100% - 1.5rem);
        border-radius: 1.25rem;
        padding: 1.35rem;
        max-height: calc(100vh - 1.5rem);
    }

    .cookie-content {
        padding-right: 0;
    }

    .cookie-details {
        max-height: 50vh;
        padding-right: 0;
    }

    .cookie-option {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-save-wrapper {
        width: 100%;
    }

    .cookie-save-wrapper .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-buttons .cookie-btn {
        width: 100%;
    }
}

@keyframes cookieFadeIn {
    from {
        transform: translate(-50%, 30px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}
