/* SV Cookie – responsive banner styles */
#cookie-consent-banner,
#cookie-consent-banner *,
#cookie-consent-overlay,
#cookie-image,
#cookie-image * {
    box-sizing: border-box;
}

#cookie-consent-overlay {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 9998;
}

#cookie-consent-banner {
    font-family: Arial, sans-serif;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 620px);
    max-height: min(90dvh, 760px);
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

#cookie-consent-banner[data-hidden="true"],
#cookie-consent-overlay[data-hidden="true"] {
    display: none;
}

.cookie-title {
    text-align: center;
    font-size: 20px;
    line-height: 1.3;
    padding: 0.8rem 1rem;
    margin: 0;
    font-weight: bold;
    border-radius: 12px;
}

.consent-text {
    color: #111;
    font-size: 16px;
    font-weight: bold;
}

p.consent-text {
    text-align: center;
    margin: 1rem 0 1.1rem;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
}

.consent-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.5rem 0 0;
    flex-wrap: wrap;
}

.consent-buttons-primary {
    align-items: stretch;
}

.cookie-consent-button {
    flex: 1 1 160px;
    max-width: 100%;
    padding: 0.8rem 1rem;
    font-size: 15px;
    line-height: 1.3;
    text-align: center;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
    border: none;
}

.cookie-consent-button.btn-success:hover {
    background-color: #f57f1e;
}

#cookie-logo-separator {
    margin: 1rem auto;
    border: 0;
    border-top: 1px solid #d9d9d9;
    width: 100%;
}

#cookie-logo img {
    display: block;
    margin: 0 auto;
    max-width: 48px;
    width: 100%;
    height: auto;
}

#cookie-consent-banner .scrollable-content {
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: calc(min(90dvh, 760px) - 250px);
    padding-right: 0.25rem;
    position: relative;
    min-height: 0;
}

#cookie-consent-banner .scrollable-content::after {
    content: '';
    position: sticky;
    display: block;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.75rem;
    margin-top: -1.75rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    z-index: 1;
}

.cookie-settings {
    margin-top: 0.5rem;
    display: none;
    padding: 0;
    max-height: none;
    overflow: visible;
}

.checkbox-wrapper-6 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.9rem 0;
    border-top: 1px solid #ececec;
}

.checkbox-wrapper-6:first-child {
    border-top: 0;
    padding-top: 0.25rem;
}

.checkbox-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.checkbox-content .consent-text {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    flex: 1;
}

.tgl-flip {
    display: none !important;
}

.tgl-flip + .tgl-btn {
    padding: 10px;
    transition: all 0.2s ease;
    perspective: 100px;
    position: relative;
    width: 62px;
    min-width: 62px;
    height: 1.7em;
    display: inline-block;
    cursor: pointer;
    border-radius: 1.7em;
    overflow: hidden;
    margin-right: 0;
}

.tgl-flip + .tgl-btn:before,
.tgl-flip + .tgl-btn:after {
    display: inline-block;
    position: absolute;
    line-height: 1.7em;
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    border-radius: 1.7em;
    transition: transform 0.3s ease;
}

.tgl-flip + .tgl-btn:before {
    content: attr(data-tg-off);
    background: #ff3a19;
}

.tgl-flip + .tgl-btn:after {
    content: attr(data-tg-on);
    background: #02c66f;
    transform: rotateY(180deg);
}

.tgl-flip:checked + .tgl-btn:before {
    transform: rotateY(180deg);
}

.tgl-flip:checked + .tgl-btn:after {
    transform: rotateY(0);
}

.tgl-flip + .tgl-disabled {
    background: #7fc6a6;
    cursor: not-allowed;
}

.description {
    color: #666;
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
}

#btn-accept-some {
    min-width: 100%;
    background-color: #ff9233;
    color: white;
    font-size: 15px;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#btn-accept-some:hover {
    background-color: #f57f1e;
}

.cookie-policy-actions {
    text-align: center;
    margin: 0.25rem 0 0.35rem;
}

.cookie-policy-link,
.cookie-policy-toggle {
    appearance: none;
    background: transparent;
    border: 0;
    color: #333;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.45;
    padding: 4px 8px;
}

.cookie-policy-panel {
    margin: 0.75rem 0 1rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    color: #333;
    font-size: 14px;
    line-height: 1.55;
}

.cookie-policy-panel table {
    width: 100%;
    border-collapse: collapse;
}

.cookie-policy-panel th,
.cookie-policy-panel td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
    vertical-align: top;
}

#btn-reject-all {
    background: transparent !important;
}

#cookie-image {
    position: fixed;
    bottom: 14px;
    left: 14px;
    width: auto;
    min-height: 48px;
    background-color: rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 0;
    padding: 10px 14px;
    cursor: pointer;
    color: #111;
    font-size: 13px;
    line-height: 1.2;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    z-index: 9999;
}

#cookie-image img {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

#cookie-image span {
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 768px) {
    #cookie-consent-banner {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        max-width: none;
        max-height: min(88dvh, 92vh);
        padding: 0.9rem 0.9rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
        border-radius: 18px 18px 0 0;
    }

    .cookie-title {
        font-size: 18px;
        padding: 0.8rem;
    }

    p.consent-text {
        font-size: 14px;
        margin: 0.9rem 0 1rem;
    }

    .consent-buttons-primary {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-consent-button,
    #btn-accept-some {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
        font-size: 15px !important;
        padding: 0.85rem 1rem;
    }

    #cookie-consent-banner .scrollable-content {
        max-height: calc(min(88dvh, 92vh) - 255px);
        padding-right: 0;
    }

    #cookie-logo img {
        max-width: 36px;
    }

    .checkbox-wrapper-6 {
        padding: 0.8rem 0;
    }

    .checkbox-content {
        align-items: flex-start;
        gap: 0.65rem;
    }

    .checkbox-content .consent-text {
        font-size: 15px;
        line-height: 1.35;
    }

    .description {
        font-size: 14px;
    }

    .cookie-policy-panel {
        font-size: 13px;
        padding: 0.85rem;
    }

    .cookie-policy-panel table,
    .cookie-policy-panel thead,
    .cookie-policy-panel tbody,
    .cookie-policy-panel th,
    .cookie-policy-panel td,
    .cookie-policy-panel tr {
        display: block;
    }

    .cookie-policy-panel th {
        border-bottom: 0;
        padding-bottom: 2px;
    }

    .cookie-policy-panel td {
        border-top: 0;
        margin-bottom: 8px;
        padding-top: 2px;
    }

    #cookie-image {
        left: 12px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
        width: 54px;
        height: 54px;
        min-height: 54px;
        padding: 0;
        border-radius: 999px;
    }

    #cookie-image span {
        display: none;
    }

    #cookie-image img {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }
}

@media (max-width: 380px) {
    #cookie-consent-banner {
        padding: 0.8rem 0.75rem calc(0.8rem + env(safe-area-inset-bottom, 0px));
    }

    .cookie-title {
        font-size: 17px;
    }

    p.consent-text,
    .description,
    .cookie-policy-link,
    .cookie-policy-toggle {
        font-size: 13px;
    }

    .checkbox-content .consent-text,
    .cookie-consent-button,
    #btn-accept-some {
        font-size: 14px !important;
    }
}


/* Persistent settings button: icon only, no wrapping text after consent */
#cookie-image {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
    gap: 0 !important;
}

#cookie-image span,
#cookie-image .cookie-settings-label {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

#cookie-image img {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    flex: 0 0 24px !important;
    display: block !important;
}

@media (max-width: 768px) {
    #cookie-image {
        left: 14px !important;
        right: auto !important;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 88px) !important;
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        min-height: 46px !important;
        max-width: 46px !important;
        max-height: 46px !important;
    }

    #cookie-image img {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
        flex-basis: 22px !important;
    }
}
