/* ==========================================================
   Cookie consent dialog (Includes/Javascript/Applets/Cookie.js)
   and the Google Maps placeholder (GoogleMapsLoader.js).
   Plain CSS on purpose: it is loaded after main.css and uses its colour tokens.
   ========================================================== */

.dbq-consent {
    position: fixed;
    z-index: 10000;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    margin-left: auto;
    background-color: var(--color-white, #ffffff);
    color: var(--color-text, #000c30);
    border-top: 4px solid var(--color-orange, #ff7000);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 12, 48, 0.25);
    font-family: var(--font-text, inherit);
    font-size: 0.95rem;
    line-height: 1.45;
}

.dbq-consent[hidden] {
    display: none;
}

.dbq-consent:focus {
    outline: none;
}

.dbq-consent-inner {
    padding: 20px 24px;
}

.dbq-consent-title {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    line-height: 1.3;
    color: var(--color-header, #000c30);
}

.dbq-consent-intro {
    margin: 0 0 12px 0;
}

.dbq-consent a {
    color: var(--color-orange, #ff7000);
    text-decoration: underline;
}

/* Categories */
.dbq-consent-categories {
    border-top: 1px solid var(--color-border-light, #eeeeee);
}

.dbq-consent-category {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light, #eeeeee);
}

.dbq-consent-category-text {
    flex: 1 1 auto;
}

.dbq-consent-category-title {
    display: block;
    margin: 0 0 2px 0;
    font-weight: 700;
    cursor: pointer;
}

.dbq-consent-category-description,
.dbq-consent-category-description span {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
}

.dbq-consent-category-provider {
    color: #5c6170;
}

/* Switch */
.dbq-consent-switch {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
    margin: 2px 0 0 0;
    cursor: pointer;
}

.dbq-consent-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.dbq-consent-switch-slider {
    position: absolute;
    inset: 0;
    background-color: #c4c7cf;
    border-radius: 12px;
    transition: background-color 0.15s ease;
    pointer-events: none;
}

.dbq-consent-switch-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background-color: var(--color-white, #ffffff);
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.dbq-consent-switch input:checked + .dbq-consent-switch-slider {
    background-color: var(--color-orange, #ff7000);
}

.dbq-consent-switch input:checked + .dbq-consent-switch-slider::before {
    transform: translateX(20px);
}

.dbq-consent-switch input:focus-visible + .dbq-consent-switch-slider {
    outline: 2px solid var(--color-dark-blue, #000c30);
    outline-offset: 2px;
}

/* Buttons: accept and refuse get the same weight */
.dbq-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.dbq-consent-button {
    flex: 1 1 auto;
    padding: 0.6rem 1rem;
    background-color: var(--color-white, #ffffff);
    color: var(--color-text, #000c30);
    border: 2px solid var(--color-orange, #ff7000);
    border-radius: 4px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.dbq-consent-button:hover,
.dbq-consent-button:focus-visible {
    background-color: var(--color-orange, #ff7000);
    color: var(--color-white, #ffffff);
}

@media (max-width: 480px) {
    .dbq-consent {
        left: 8px;
        right: 8px;
        bottom: 8px;
    }

    .dbq-consent-inner {
        padding: 16px;
    }

    .dbq-consent-button {
        flex-basis: 100%;
    }
}

/* Google Maps placeholder, shown inside #map until the visitor gives consent for the map */
.dbq-map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-height: inherit;
    padding: 24px;
    box-sizing: border-box;
    background-color: var(--color-light-gray, #f0f0f0);
    color: var(--color-text, #000c30);
    text-align: center;
}

.dbq-map-placeholder-text {
    max-width: 360px;
    margin: 0;
}

.dbq-map-placeholder .dbq-consent-button {
    flex: 0 0 auto;
}

.dbq-map-placeholder-link {
    color: var(--color-orange, #ff7000);
    text-decoration: underline;
    font-size: 0.875rem;
}
