/*
 * Cookie consent banner – see docs/consent.md.
 *
 * Deliberately self-contained: the same banner is rendered by the frontpage
 * template (public Bootstrap build) and by the auth layout (admin Bootstrap
 * build), which load different compilations of the theme, so nothing here may
 * rely on theme variables. Only the primary colour is repeated ($primary of the
 * United Bootswatch theme, see assets/admin/css/styles.scss).
 */

#sp-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: flex;
    justify-content: center;
    padding: 0.75rem;
    /* The area around the box must not swallow clicks on the page below. */
    pointer-events: none;
}

#sp-consent[hidden] {
    display: none;
}

.sp-consent__inner {
    pointer-events: auto;
    position: relative;
    width: 100%;
    max-width: 48rem;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1rem 1.25rem 1.15rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    background: #fff;
    color: #212529;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
    font: 400 0.9rem/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    text-align: left;
}

.sp-consent__title {
    margin: 0 1.75rem 0.5rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #212529;
}

.sp-consent__message {
    margin: 0 0 0.85rem;
}

.sp-consent__message a {
    color: #b5451b;
}

.sp-consent__close {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border: 0;
    background: none;
    color: #6c757d;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

/* There is nothing to dismiss before the visitor answers (see consent.js). */
.sp-consent__close[hidden] {
    display: none;
}

.sp-consent__close:hover {
    color: #212529;
}

.sp-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.sp-consent__btn {
    padding: 0.45rem 0.9rem;
    border: 1px solid #6c757d;
    border-radius: 0.375rem;
    background: #fff;
    color: #212529;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.sp-consent__btn:hover {
    background: #f1f3f5;
}

.sp-consent__btn--primary {
    border-color: #e95420;
    background: #e95420;
    color: #fff;
}

.sp-consent__btn--primary:hover {
    background: #c7431a;
}

.sp-consent__btn--link {
    padding-right: 0.25rem;
    padding-left: 0.25rem;
    border-color: transparent;
    background: none;
    color: #b5451b;
    text-decoration: underline;
}

.sp-consent__btn--link:hover {
    background: none;
    text-decoration: none;
}

/* Category list, shown after "Tvarkyti nustatymus". */
.sp-consent__groups {
    display: none;
}

.sp-consent--custom .sp-consent__groups {
    display: block;
}

.sp-consent--custom .sp-consent__simple {
    display: none;
}

.sp-consent__group {
    display: flex;
    gap: 0.65rem;
    padding: 0.6rem 0;
    border-top: 1px solid #e9ecef;
}

.sp-consent__group input {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.2rem 0 0;
}

.sp-consent__group label {
    cursor: pointer;
}

.sp-consent__group-name {
    display: block;
    font-weight: 600;
}

.sp-consent__group-desc {
    display: block;
    color: #6c757d;
    font-size: 0.85rem;
}

.sp-consent__groups-actions {
    margin-top: 0.85rem;
}

/*
 * "Slapukų nustatymai" trigger. Sits inside the frontpage footer links row, so
 * it has to look like the links next to it; the --overlay variant is placed
 * over the photo background of the auth pages and needs to stay readable there.
 */
.sp-consent__link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.sp-consent__link-btn:hover {
    text-decoration: none;
}

.sp-consent__link-btn--overlay {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/*
 * Placeholder shown in the frontpage video section instead of the YouTube
 * iframe while the 'media' category has not been granted.
 */
.sp-consent-video {
    padding: 2.5rem 1.25rem;
    border: 1px dashed #ced4da;
    border-radius: 0.5rem;
    background: #f8f9fa;
}

.sp-consent-video p:last-child {
    margin-bottom: 0;
}

@media (max-width: 576px) {
    #sp-consent {
        padding: 0;
    }

    .sp-consent__inner {
        max-width: none;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0.5rem 0.5rem 0 0;
    }
}