/* ========================================
   BASE STYLES
======================================== */

.bf-cookie-banner,
.bf-cookie-dialog {
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    color: #212529;
}

.bf-cookie-banner[hidden],
.bf-cookie-overlay[hidden],
.bf-cookie-dialog[hidden] {
    display: none !important;
}


/* ========================================
   COMPACT ANALYTICS BANNER
======================================== */

.bf-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;

    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;

    background: #212529;
    color: #ffffff;

    padding: 14px max(
        20px,
        calc((100vw - 1200px) / 2)
    );

    max-height: 50vh;
    overflow-y: auto;

    box-shadow: 0 -5px 25px #0004;
}


/* ========================================
   BANNER TEXT
======================================== */

.bf-cookie-copy {
    flex: 1 1 420px;
    min-width: 0;
}

.bf-cookie-copy h2 {
    margin: 0 0 5px;
    font-size: 18px;
    line-height: 1.3;
    color: #ffffff;
}

.bf-cookie-copy p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.bf-cookie-copy a {
    color: #fcc9d1;
    text-decoration: underline;
}


/* ========================================
   BANNER BUTTONS
======================================== */

.bf-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bf-btn,
.bf-cookie-dialog .bf-cookie-btn {
    min-height: 44px;

    padding: 10px 14px;

    border: 2px solid #fcc9d1;
    border-radius: 8px;

    cursor: pointer;

    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.bf-btn-primary,
.bf-cookie-dialog .bf-cookie-accept {
    background: #fcc9d1;
    color: #212529;
}

.bf-btn-secondary {
    background: transparent;
    color: inherit;
}

.bf-btn:hover,
.bf-cookie-dialog .bf-cookie-btn:hover {
    filter: brightness(0.94);
}

.bf-btn:focus-visible,
.bf-cookie-dialog .bf-cookie-btn:focus-visible,
.bf-cookie-close:focus-visible,
.bf-cookie-option input:focus-visible {
    outline: 3px solid #008ba3;
    outline-offset: 3px;
}


/* ========================================
   SETTINGS OVERLAY
======================================== */

.bf-cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    background: #0009;
}


/* ========================================
   SETTINGS DIALOG
======================================== */

.bf-cookie-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10000;

    transform: translate(-50%, -50%);

    width: min(94vw, 600px);
    max-height: 90vh;
    overflow-y: auto;

    padding: 25px;

    background: #ffffff;
    border-radius: 12px;

    box-shadow: 0 12px 40px #0005;
}

.bf-cookie-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bf-cookie-dialog h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
}

.bf-cookie-dialog > p {
    line-height: 1.6;
}

.bf-cookie-close {
    min-width: 44px;
    min-height: 44px;

    background: transparent;
    border: 0;

    font-size: 32px;
    line-height: 1;

    cursor: pointer;
    color: #212529;
}


/* ========================================
   COOKIE OPTIONS
======================================== */

.bf-cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 18px 0;
    border-top: 1px solid #dddddd;
}

.bf-cookie-option p,
.bf-cookie-help {
    display: block;

    margin: 5px 0 0;

    font-size: 14px;
    line-height: 1.5;
    color: #555555;
}

.bf-cookie-option input {
    width: 23px;
    height: 23px;
    flex: none;

    accent-color: #212529;
}

.bf-cookie-required {
    font-size: 13px;
    white-space: nowrap;
    color: #555555;
}


/* ========================================
   DIALOG BUTTONS
======================================== */

.bf-cookie-dialog-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.bf-cookie-dialog .bf-btn-secondary {
    color: #212529;
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 600px) {

    .bf-cookie-banner {
        padding: 12px 16px;
        gap: 12px;
    }

    .bf-cookie-copy {
        flex-basis: 100%;
    }

    .bf-cookie-actions {
        width: 100%;
    }

    .bf-cookie-actions .bf-btn {
        flex: 1 1 130px;
    }

    .bf-cookie-dialog {
        padding: 20px;
    }

    .bf-cookie-dialog-actions .bf-btn,
    .bf-cookie-dialog-actions .bf-cookie-btn {
        flex: 1 1 140px;
    }
}