/* =============================================================================
   Archie Cookie Consent – consent.css
   ============================================================================= */

/* Overlay */
.acc-consent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.acc-consent-overlay.acc-open {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.acc-consent-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 1rem;
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.acc-consent-modal.acc-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal inner box – slides up as it fades in */
.acc-consent-modal-box {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}
.acc-consent-modal.acc-open .acc-consent-modal-box {
    transform: translateY(0);
}

/* Typography */
.acc-consent-modal-box h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}
.acc-consent-modal-box .acc-intro {
    margin: 0 0 1.25rem;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.65;
}
.acc-consent-modal-box .acc-intro a {
    color: #2563eb;
    text-decoration: underline;
}

/* Category list */
.acc-cats {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.acc-cats.acc-open {
    display: block;
}

/* Locked (essential) toggle */
.acc-category-toggle.acc-locked {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.acc-cat {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}
.acc-cat:last-child { border-bottom: none; }

.acc-cat-info { flex: 1; min-width: 0; }
.acc-cat-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.15rem;
}
.acc-cat-always {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 0.25rem;
}
.acc-cat-desc {
    margin: 0;
    font-size: 0.775rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* Toggle switch */
.acc-toggle {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    margin-top: 1px;
}
.acc-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.acc-toggle-track {
    position: absolute;
    inset: 0;
    border-radius: 26px;
    background: #d1d5db;
    cursor: pointer;
    transition: background 0.2s;
}
.acc-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    transition: left 0.2s;
}
.acc-toggle input:checked + .acc-toggle-track { background: #2563eb; }
.acc-toggle input:checked + .acc-toggle-track::after { left: 23px; }
.acc-toggle input:focus-visible + .acc-toggle-track {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.acc-toggle input:disabled + .acc-toggle-track {
    background: #93c5fd;
    cursor: not-allowed;
}

/* Buttons */
.acc-actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.acc-btn {
    width: 100%;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: filter 0.15s;
    box-sizing: border-box;
    line-height: 1;
}
.acc-btn:hover { filter: brightness(0.92); }
.acc-btn-primary { background: #2563eb; color: #fff; }
.acc-btn-outline { background: #f9fafb; color: #374151; border: 1px solid #e5e7eb; }
.acc-btn-ghost {
    background: transparent;
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.8rem;
    padding: 0.3rem 0;
    text-decoration: underline;
}

body.acc-modal-open {
    overflow: hidden;
}
