/* MC Cookie Consent Banner */
.mc-consent {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    font-family: var(--mc-font, 'Fraunces', ui-serif, Georgia, serif);
}
.mc-consent--bottom { align-items: flex-end; }
.mc-consent--center { align-items: center; }

.mc-consent[hidden] { display: none !important; }

/* Scroll lock on body */
body.mc-consent-lock {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    touch-action: none;
    -webkit-overflow-scrolling: none;
    overscroll-behavior: none;
}

/* Overlay */
.mc-consent__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Dialog */
.mc-consent__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    margin: 16px 16px 40px;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 36px;
    box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.18);
    color: var(--mc-text, #5b3925);
    animation: mcConsentSlideUp 0.35s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

/* Title */
.mc-consent__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--mc-text, #5b3925);
}

/* Text */
.mc-consent__text {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 22px;
    color: var(--mc-text, #5b3925);
    opacity: 0.85;
}

/* Actions */
.mc-consent__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.mc-consent__btn {
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
    white-space: nowrap;
}

.mc-consent__btn--accept {
    background: var(--mc-accent, #a57748);
    color: #F2E4DC;
    flex: 1;
    min-width: 160px;
    order: 2;
}
.mc-consent__btn--accept:hover {
    background: var(--mc-text, #5b3925);
}

.mc-consent__btn--settings {
    background: transparent;
    color: var(--mc-accent, #a57748);
    border: 1.5px solid var(--mc-border, rgba(165,119,72,.32));
    flex: 0 0 auto;
    order: 1;
}
.mc-consent__btn--settings:hover {
    background: var(--mc-bg, #F2E4DC);
    color: var(--mc-accent, #a57748);
}

.mc-consent__btn--save {
    background: var(--mc-bg, #F2E4DC);
    color: var(--mc-text, #5b3925);
    border: 1.5px solid var(--mc-border, rgba(165,119,72,.32));
    flex: 1;
    min-width: 140px;
}
.mc-consent__btn--save:hover {
    background: var(--mc-accent, #a57748);
    color: #F2E4DC;
    border-color: var(--mc-accent, #a57748);
}

/* Details panel */
.mc-consent__details[hidden] { display: none; }
.mc-consent__details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--mc-border, rgba(165,119,72,.32));
    animation: mcConsentFadeIn 0.25s ease;
}

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

/* Categories */
.mc-consent__categories {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.mc-consent__cat {
    padding: 14px 18px;
    background: var(--mc-bg, #F2E4DC);
    border-radius: 12px;
    border: 1px solid var(--mc-border, rgba(165,119,72,.15));
}

.mc-consent__cat-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
}

/* Custom checkbox */
.mc-consent__cat-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mc-consent__cat-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 2px solid var(--mc-accent, #a57748);
    border-radius: 6px;
    background: #fff;
    flex-shrink: 0;
    transition: all 0.15s;
}

.mc-consent__cat-label input:checked + .mc-consent__cat-check {
    background: var(--mc-accent, #a57748);
    border-color: var(--mc-accent, #a57748);
}
.mc-consent__cat-label input:checked + .mc-consent__cat-check::after {
    content: '';
    display: block;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.mc-consent__cat-label input:disabled + .mc-consent__cat-check {
    opacity: 0.6;
    cursor: not-allowed;
}

.mc-consent__cat-desc {
    font-size: 14px;
    color: var(--mc-text, #5b3925);
    opacity: 0.7;
    margin: 6px 0 0 32px;
    line-height: 1.4;
}

/* Reopen button */
.mc-consent-reopen {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 9998;
}
.mc-consent-reopen[hidden] { display: none !important; }

.mc-consent-reopen button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--mc-accent, #a57748);
    color: #F2E4DC;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    transition: all 0.2s;
}
.mc-consent-reopen button:hover {
    background: var(--mc-text, #5b3925);
    transform: scale(1.1);
}

/* Mobile */
@media (max-width: 500px) {
    .mc-consent__dialog {
        margin: 8px 8px 32px;
        padding: 24px 20px;
        border-radius: 16px;
    }
    .mc-consent__title { font-size: 21px; }
    .mc-consent__text { font-size: 15px; }
    .mc-consent__btn { font-size: 15px; }
    .mc-consent__actions { flex-direction: column; }
    .mc-consent__btn { width: 100%; text-align: center; }
    .mc-consent__btn--accept { order: 1; }
    .mc-consent__btn--settings { order: 2; }
}
