/* Custom Cookie Consent Banner Styles */

.metline-consent-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(15, 25, 33, 0.15);
    color: var(--text, #202b35);
    font-family: Roboto, sans-serif;
    overflow: hidden;
    animation: metline-consent-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes metline-consent-slide-up {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.consent-container {
    padding: 24px;
}

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

.consent-header h3 {
    margin: 0;
    font-family: Montserrat, sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--navy, #17242f);
}

.consent-cookie-icon {
    color: var(--red, #d81130);
    width: 22px;
    height: 22px;
}

.consent-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--muted, #636d78);
    margin: 0 0 20px 0;
}

.consent-text a {
    color: var(--red, #d81130);
    text-decoration: underline;
    font-weight: 500;
}

.consent-text a:hover {
    color: var(--red-dark, #c8102e);
}

.consent-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.consent-actions .consent-btn-link {
    flex: 1 1 100%;
    justify-content: flex-start;
    order: -1;
}

.consent-actions .consent-btn-secondary,
.consent-actions .consent-btn-primary {
    flex: 1 1 0;
    min-width: 140px;
}

.consent-btn {
    box-sizing: border-box;
    min-height: 40px;
    padding: 0 16px;
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
}

.consent-btn:active {
    transform: scale(0.97);
}

.consent-btn-primary {
    background: var(--red, #d81130);
    color: #fff;
}

.consent-btn-primary:hover {
    background: var(--red-dark, #c8102e);
}

.consent-btn-secondary {
    background: transparent;
    color: var(--navy, #17242f);
    border: 2px solid var(--navy, #17242f);
}

.consent-btn-secondary:hover {
    background: var(--navy, #17242f);
    color: #fff;
}

.consent-btn-link {
    background: transparent;
    color: var(--muted, #636d78);
    padding: 0 8px;
    text-decoration: underline;
    text-transform: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
}

.consent-btn-link:hover {
    color: var(--navy, #17242f);
    background: rgba(0, 0, 0, 0.03);
}

/* Preferences Settings Modal (inside banner) */
.consent-preferences {
    border-top: 1px solid var(--line, #e6ebef);
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    animation: metline-consent-fade-in 0.3s ease forwards;
}

@keyframes metline-consent-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.consent-preferences h4 {
    margin: 0 0 6px 0;
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--navy, #17242f);
}

.consent-preferences-intro {
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted, #636d78);
    margin: 0 0 16px 0;
}

.consent-options-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.consent-option-item {
    padding-bottom: 12px;
}

.consent-option-item:not(:last-child) {
    border-bottom: 1px solid rgba(230, 235, 239, 0.5);
}

.consent-option-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}

.consent-option-title {
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy, #17242f);
}

.consent-option-desc {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--muted, #636d78);
    margin: 0;
}

/* Custom Switch Toggle */
.consent-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex: 0 0 36px;
}

.consent-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 20px;
}

.consent-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.consent-switch input:checked + .consent-slider {
    background-color: var(--green, #14854c);
}

.consent-switch input:disabled + .consent-slider {
    background-color: var(--navy, #17242f);
    opacity: 0.6;
    cursor: not-allowed;
}

.consent-switch input:focus + .consent-slider {
    box-shadow: 0 0 1px var(--green, #14854c);
}

.consent-switch input:checked + .consent-slider:before {
    transform: translateX(16px);
}

.consent-preferences-actions {
    display: flex;
    justify-content: flex-end;
}

/* Responsive adjustments */
@media (max-width: 580px) {
    .metline-consent-banner {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }
    
    .consent-container, .consent-preferences {
        padding: 20px 16px;
    }
    
    .consent-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .consent-btn {
        width: 100%;
    }
    
    .consent-actions .consent-btn-link {
        order: 3;
        margin-top: 4px;
    }
}

#metline-cookie-settings-trigger {
    text-decoration: underline;
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.18s ease;
}

#metline-cookie-settings-trigger:hover {
    color: var(--red, #d81130);
}

.footer-credits {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-credits a {
    text-decoration: none !important;
    color: inherit;
    transition: color 0.18s ease;
}

.footer-credits a:hover {
    color: var(--red, #d81130);
}
