.silva-cookie-banner[hidden],
.silva-cookie-modal[hidden] {
    display: none !important;
}

.silva-cookie-banner {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 999999;
    font-family: inherit;
}

.silva-cookie-banner__inner {
    max-width: 1040px;
    margin: 0 auto;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 16px;
    box-shadow: 0 18px 55px rgba(0,0,0,.16);
    padding: 18px 20px;
    display: flex;
    gap: 22px;
    align-items: center;
    justify-content: space-between;
}

.silva-cookie-banner__content {
    max-width: 650px;
}

.silva-cookie-banner__title {
    font-size: 18px;
    line-height: 1.2;
    font-weight: 650;
    margin-bottom: 6px;
}

.silva-cookie-banner__text {
    font-size: 14px;
    line-height: 1.55;
    color: #4b4b4b;
}

.silva-cookie-banner__text p {
    margin: 0;
}

.silva-cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.silva-cookie-btn,
.silva-cookie-link,
.silva-cookie-settings-link {
    font: inherit;
    cursor: pointer;
}

.silva-cookie-btn {
    border: 1px solid #1f1f1f;
    background: #fff;
    color: #1f1f1f;
    border-radius: 999px;
    padding: 10px 16px;
    line-height: 1.1;
}

.silva-cookie-btn--primary {
    background: #1f1f1f;
    color: #fff;
}

.silva-cookie-link,
.silva-cookie-settings-link {
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: underline;
    padding: 6px 4px;
}

.silva-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    font-family: inherit;
}

.silva-cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.42);
}

.silva-cookie-modal__dialog {
    position: relative;
    width: min(620px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    margin: 24px auto;
    background: #fff;
    color: #1f1f1f;
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
}

.silva-cookie-modal__dialog h2 {
    margin: 0 40px 18px 0;
    font-size: 24px;
}

.silva-cookie-modal__close {
    position: absolute;
    right: 18px;
    top: 14px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.silva-cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid rgba(0,0,0,.09);
}

.silva-cookie-category strong {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
}

.silva-cookie-category p {
    margin: 0;
    color: #5b5b5b;
    font-size: 14px;
    line-height: 1.5;
}

.silva-cookie-always-on {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    opacity: .7;
}

.silva-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
}

.silva-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.silva-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #ccc;
    transition: .2s ease;
}

.silva-switch span::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: .2s ease;
}

.silva-switch input:checked + span {
    background: #1f1f1f;
}

.silva-switch input:checked + span::after {
    transform: translateX(20px);
}

.silva-cookie-modal__actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 18px;
}

html.silva-cookie-modal-open,
html.silva-cookie-modal-open body {
    overflow: hidden;
}

@media (max-width: 760px) {
    .silva-cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .silva-cookie-banner__inner {
        display: block;
        padding: 16px;
        border-radius: 14px;
    }

    .silva-cookie-banner__actions {
        margin-top: 14px;
        justify-content: flex-start;
    }

    .silva-cookie-btn {
        padding: 10px 14px;
    }

    .silva-cookie-modal__dialog {
        width: calc(100% - 20px);
        margin: 10px auto;
        max-height: calc(100vh - 20px);
        padding: 20px;
    }
}
