/* -------------------------------------------------------
   Cookie banner
------------------------------------------------------- */

.gh-cookie-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 1085;

    width: calc(100% - 2rem);
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem;

    color: #fff;
    background: #171718;
    border: 1px solid rgba(255, 223, 0, 0.22);
    border-radius: 1rem;

    box-shadow:
        0 1rem 3rem rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.025);
}

.gh-cookie-banner__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.gh-cookie-banner__content h2 {
    margin: 0 0 0.5rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.gh-cookie-banner__content p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.gh-cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}


/* -------------------------------------------------------
   Buttons
------------------------------------------------------- */

.gh-cookie-banner .btn-primary,
#ghCookiePreferences .btn-primary {
    color: #111112;
    font-weight: 700;
    background: #FFDF00;
    border-color: #FFDF00;
}

.gh-cookie-banner .btn-primary:hover,
.gh-cookie-banner .btn-primary:focus,
#ghCookiePreferences .btn-primary:hover,
#ghCookiePreferences .btn-primary:focus {
    color: #111112;
    background: #ffe83d;
    border-color: #ffe83d;
}

.gh-cookie-banner .btn-primary:active,
#ghCookiePreferences .btn-primary:active {
    color: #111112 !important;
    background: #e6c900 !important;
    border-color: #e6c900 !important;
}

.gh-cookie-banner .btn-outline-light,
#ghCookiePreferences .btn-outline-secondary {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.35);
}

.gh-cookie-banner .btn-outline-light:hover,
.gh-cookie-banner .btn-outline-light:focus,
#ghCookiePreferences .btn-outline-secondary:hover,
#ghCookiePreferences .btn-outline-secondary:focus {
    color: #111112;
    background: #fff;
    border-color: #fff;
}

.gh-cookie-banner .btn-link {
    color: #FFDF00;
    font-weight: 600;
    text-decoration-color: rgba(255, 223, 0, 0.5);
}

.gh-cookie-banner .btn-link:hover,
.gh-cookie-banner .btn-link:focus {
    color: #ffe83d;
    text-decoration-color: #ffe83d;
}


/* -------------------------------------------------------
   Preferences modal
------------------------------------------------------- */

#ghCookiePreferences .modal-content {
    overflow: hidden;
    color: #fff;
    background: #171718;
    border: 1px solid rgba(255, 223, 0, 0.22);
    border-radius: 1rem;

    box-shadow:
        0 1.5rem 4rem rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.025);
}

#ghCookiePreferences .modal-header,
#ghCookiePreferences .modal-footer {
    background: #171718;
    border-color: rgba(255, 255, 255, 0.1);
}

#ghCookiePreferences .modal-header {
    padding: 1.25rem;
}

#ghCookiePreferences .modal-title {
    color: #fff;
    font-weight: 700;
}

#ghCookiePreferences .modal-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #171718;
}

#ghCookiePreferences .modal-body hr {
    display: none;
}

#ghCookiePreferences .gh-cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;

    padding: 1rem;
    background: #111112;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
}

#ghCookiePreferences .gh-cookie-option strong {
    color: #fff;
    font-weight: 700;
}

#ghCookiePreferences .gh-cookie-option p {
    margin: 0.4rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.55;
}

#ghCookiePreferences .gh-cookie-option>span {
    flex-shrink: 0;
    color: #FFDF00;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: right;
}


/* -------------------------------------------------------
   Close button
------------------------------------------------------- */

#ghCookiePreferences .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.65;
}

#ghCookiePreferences .btn-close:hover,
#ghCookiePreferences .btn-close:focus {
    opacity: 1;
}


/* -------------------------------------------------------
   Analytics toggle
------------------------------------------------------- */

#ghCookiePreferences .form-check-input {
    width: 2.75rem;
    height: 1.4rem;
    margin-top: 0.15rem;
    cursor: pointer;

    background-color: #333336;
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

#ghCookiePreferences .form-check-input:checked {
    background-color: #FFDF00;
    border-color: #FFDF00;
}

#ghCookiePreferences .form-check-input:focus {
    border-color: #FFDF00;
    box-shadow: 0 0 0 0.2rem rgba(255, 223, 0, 0.2);
}


/* -------------------------------------------------------
   Backdrop and accessibility
------------------------------------------------------- */

#ghCookiePreferences+.modal-backdrop,
.modal-backdrop.show {
    opacity: 0.72;
}

.gh-cookie-banner .btn:focus-visible,
#ghCookiePreferences .btn:focus-visible,
#ghCookiePreferences .form-check-input:focus-visible {
    outline: 2px solid #FFDF00;
    outline-offset: 3px;
}


/* -------------------------------------------------------
   Mobile
------------------------------------------------------- */

@media (max-width: 767.98px) {
    .gh-cookie-banner {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;

        width: calc(100% - 1.5rem);
        padding: 1rem;
    }

    .gh-cookie-banner__content {
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
    }

    .gh-cookie-banner__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

    .gh-cookie-banner__actions .btn-link {
        grid-column: 1 / -1;
    }

    #ghCookiePreferences .gh-cookie-option {
        gap: 1rem;
    }
}

@media (max-width: 420px) {
    .gh-cookie-banner__actions {
        display: flex;
        flex-direction: column;
    }

    #ghCookiePreferences .modal-dialog {
        margin: 0.75rem;
    }
}