/* Kooders Cookie Checker — styling matched to the kooders theme look */

/* Cookie bar */
.kc-cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 75%;
    z-index: 1050;
    padding: 1.25rem 1.5rem;
    background-color: var(--dark, rgb(41, 51, 52));
    color: #FFF;
    text-align: center;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.kc-cookie-bar.kc-cookie-bar-hidden {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.kc-cookie-bar-text {
    margin-bottom: 0.75rem;
}

.kc-cookie-bar a {
    color: #FFF;
    text-decoration: underline;
}

.kc-cookie-bar button {
    white-space: nowrap;
}

@media (min-width: 1200px) {
    .kc-cookie-bar-text {
        margin-bottom: 0;
    }
}

@media (max-width: 991px) {
    .kc-cookie-bar {
        width: 100%;
    }
}

/* Cookie selection modal */
.kc-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.55);
    overflow-y: auto;
    padding: 2rem 1rem;
}

.kc-modal.kc-modal-hidden {
    display: none;
}

body.kc-modal-open {
    overflow: hidden;
}

.kc-modal-dialog {
    width: 100%;
    max-width: 720px;
    margin: auto;
}

.kc-modal-content {
    background-color: #FFF;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 4rem);
    color: var(--dark, rgb(41, 51, 52));
}

/*
 * The theme renders the whole page inside <body class="darkbg">, whose rules
 * (.darkbg a, .darkbg h2..h6) would otherwise force the modal's links and
 * headings white. All modal text selectors below are scoped through
 * .kc-modal so they out-specify the theme's darkbg rules regardless of
 * stylesheet order. Links use the theme's normal link color.
 */
.kc-modal .kc-modal-content a,
.kc-modal .kc-modal-content a:focus,
.kc-modal .kc-modal-content a:active {
    color: var(--dark, rgb(41, 51, 52));
}

.kc-modal .kc-modal-content a:hover {
    color: var(--dark, rgb(41, 51, 52));
    filter: brightness(60%);
}

/* Headings inside the modal stay dark even though the theme whites out all
 * headings on the dark page body (.darkbg h2..h6). The selector must carry
 * two classes: the package CSS is printed by header_required BEFORE the
 * theme's kooders.css link, so a specificity tie would lose to the theme. */
.kc-modal .kc-modal-content h2,
.kc-modal .kc-modal-content h3,
.kc-modal .kc-modal-content h4,
.kc-modal .kc-modal-content h5,
.kc-modal .kc-modal-content h6 {
    color: var(--dark, rgb(41, 51, 52));
}

.kc-modal-content hr {
    color: var(--gray, rgb(233, 233, 233));
    background-color: var(--gray, rgb(233, 233, 233));
    border: none;
    height: 1px;
    opacity: 1;
}

.kc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray, rgb(233, 233, 233));
}

.kc-modal-title {
    font-size: 1.15rem;
    margin: 0;
}

.kc-modal-title img {
    height: 60px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.kc-modal-close {
    border: none;
    background: transparent;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: var(--dark, rgb(41, 51, 52));
    flex-shrink: 0;
}

@media (max-width: 575px) {
    .kc-modal-header {
        padding: 1rem;
        gap: 0.5rem;
    }

    .kc-modal-title img {
        width: 70%;
        height: auto;
        max-height: 60px;
    }
}

.kc-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.kc-modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray, rgb(233, 233, 233));
}

.kc-modal-footer .btn-outline-primary,
.kc-modal-footer .btn-outline-secondary {
    color: var(--dark, rgb(41, 51, 52));
}

.kc-cookie-group {
    margin-bottom: 1.5rem;
}

.kc-cookie-group h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.kc-cookie-group p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.kc-cookie-checkbox label {
    cursor: pointer;
    margin-left: 0.35rem;
}

.kc-cookie-privacy {
    text-align: center;
}

.kc-cookie-privacy .privacy-policy-link {
    text-decoration: underline;
}

/* Cookie settings link in the theme footer (below the social icons) */
#cookieSettingsLink.kc-cookie-settings-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 1rem;
    color: #FFF;
    text-decoration: underline;
    cursor: pointer;
}

#cookieSettingsLink.kc-cookie-settings-link:hover {
    color: var(--lightblue, rgb(218, 226, 237));
}

/* Toast notifications */
#kcToastContainer {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.kc-toast {
    min-width: 240px;
    max-width: 360px;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    color: #FFF;
    background-color: var(--blue, rgb(72, 111, 166));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    opacity: 1;
    transition: opacity 0.4s ease;
}

.kc-toast-success {
    background-color: rgb(46, 125, 92);
}

.kc-toast-warning {
    background-color: rgb(176, 68, 68);
}

.kc-toast-hide {
    opacity: 0;
}