/* =========================================================
   COOKIE PREFERENCES
   ========================================================= */

.cookie-preferences-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99999;
}

.cookie-preferences-box {
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.30);

    /* Important */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/* =========================================================
   HEADER
   ========================================================= */

.cookie-preferences-header {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 25px;

    background: #14532d;
    color: #ffffff;
}

.cookie-preferences-header h3 {
    margin: 0;
    font-size: 21px;
}

.cookie-close-btn {
    border: 0;
    background: transparent;
    color: #ffffff;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;
}


/* =========================================================
   BODY
   ========================================================= */

.cookie-preferences-body {
    padding: 20px;

    /* Only the body scrolls */
    overflow-y: auto;

    /* Allows footer to remain visible */
    flex: 1 1 auto;
    min-height: 0;
}

.cookie-preferences-body > p {
    margin-top: 0;
    margin-bottom: 15px;

    color: #555;
    line-height: 1.6;
}


/* =========================================================
   COOKIE OPTIONS
   ========================================================= */

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-info {
    flex: 1;
}

.cookie-option-info strong {
    display: block;

    margin-bottom: 5px;

    color: #14532d;
    font-size: 16px;
}

.cookie-option-info p {
    margin: 0;

    color: #666;
    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   TOGGLE
   ========================================================= */

.cookie-toggle {
    min-width: 90px;
    text-align: right;
    flex-shrink: 0;
}

.cookie-toggle input {
    width: 18px;
    height: 18px;

    vertical-align: middle;

    accent-color: #14532d;
}

.cookie-toggle label {
    margin-left: 5px;

    font-size: 13px;
    color: #555;
}


/* =========================================================
   FOOTER / BUTTONS
   ========================================================= */

.cookie-preferences-footer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding: 18px 25px;
    background: #f5f7f5;
    border-top: 1px solid #e5e7eb;
}
.cookie-btn {
    border: none;
    border-radius: 5px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.cookie-btn-reject {
    background: #e5e7eb;
    color: #333;
}

.cookie-btn-reject:hover {
    background: #d1d5db;
}

.cookie-btn-save {
    background: #14532d;
    color: #ffffff;
}

.cookie-btn-save:hover {
    background: #0f3f22;
}

.cookie-btn-accept {
    background: #198754;
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background: #157347;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .cookie-preferences-overlay {
        padding: 10px;
    }

    .cookie-preferences-box {
        max-height: 95vh;
    }

    .cookie-preferences-header {
        padding: 16px 18px;
    }

    .cookie-preferences-body {
        padding: 18px;
    }

    .cookie-option {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .cookie-toggle {
        text-align: left;
    }

    .cookie-preferences-footer {
        padding: 15px 18px;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }
}
/* =========================================================
   SAFE TOOLS LTD - COOKIE PREFERENCES POPUP
   Appears ABOVE the cookie notification banner
   ========================================================= */

.cookie-preferences-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.55);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    /* Higher than .st-cookie-banner (999999) */
    z-index: 1000000;
}


/* =========================================================
   PREFERENCES BOX
   ========================================================= */

.cookie-preferences-box {
    width: 100%;
    max-width: 620px;

    background: #ffffff;

    border-radius: 10px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35);

    overflow: hidden;

    /* Keep popup compact */
    max-height: calc(100vh - 80px);

    display: flex;
    flex-direction: column;
}


/* =========================================================
   HEADER
   ========================================================= */

.cookie-preferences-header {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 17px 22px;

    background: #07301e;

    border-bottom: 3px solid #d4af37;

    color: #ffffff;
}

.cookie-preferences-header h3 {
    margin: 0;

    color: #ffffff;

    font-size: 19px;
    font-weight: 600;
}

.cookie-close-btn {
    border: none;

    background: transparent;

    color: #ffffff;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    padding: 0 4px;
}

.cookie-close-btn:hover {
    color: #d4af37;
}


/* =========================================================
   BODY
   ========================================================= */

.cookie-preferences-body {
    padding: 20px 22px;

    overflow-y: auto;

    flex: 1 1 auto;

    min-height: 0;
}

.cookie-preferences-body > p {
    margin: 0 0 16px;

    color: #555555;

    font-size: 13px;

    line-height: 1.55;
}


/* =========================================================
   COOKIE OPTIONS
   ========================================================= */

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 14px 0;

    border-bottom: 1px solid #e5e7eb;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-info {
    flex: 1;
}

.cookie-option-info strong {
    display: block;

    margin-bottom: 3px;

    color: #07301e;

    font-size: 15px;
    font-weight: 600;
}

.cookie-option-info p {
    margin: 0;

    color: #666666;

    font-size: 12px;

    line-height: 1.45;
}


/* =========================================================
   COOKIE TOGGLE
   ========================================================= */

.cookie-toggle {
    min-width: 90px;

    flex-shrink: 0;

    text-align: right;
}

.cookie-toggle input {
    width: 18px;
    height: 18px;

    vertical-align: middle;

    accent-color: #0d633d;
}

.cookie-toggle label {
    margin-left: 4px;

    color: #555555;

    font-size: 12px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.cookie-preferences-footer {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    padding: 14px 22px;

    background: #f5f7f5;

    border-top: 1px solid #e1e5e2;
}


/* =========================================================
   PREFERENCE BUTTONS
   ========================================================= */

.cookie-btn {
    border: none;

    padding: 9px 15px;

    border-radius: 5px;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;
}


/* Reject */
.cookie-btn-reject {
    background: transparent;

    color: #333333;

    border: 1px solid #bbbbbb;
}

.cookie-btn-reject:hover {
    background: #eeeeee;
}


/* Save */
.cookie-btn-save {
    background: #0d633d;

    color: #ffffff;

    border: 1px solid #0d633d;
}

.cookie-btn-save:hover {
    background: #12804d;
}


/* Accept */
.cookie-btn-accept {
    background: #d4af37;

    color: #07301e;

    border: 1px solid #d4af37;
}

.cookie-btn-accept:hover {
    background: #f0cf55;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .cookie-preferences-overlay {
        padding: 12px;
    }

    .cookie-preferences-box {
        max-height: calc(100vh - 24px);
    }

    .cookie-preferences-header {
        padding: 15px 18px;
    }

    .cookie-preferences-body {
        padding: 17px 18px;
    }

    .cookie-option {
        align-items: flex-start;

        flex-direction: column;

        gap: 8px;
    }

    .cookie-toggle {
        text-align: left;
    }

    .cookie-preferences-footer {
        padding: 12px 18px;

        display: grid;

        grid-template-columns: 1fr 1fr;

        gap: 8px;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-btn-accept {
        grid-column: span 2;
    }
}