.ts-cookie-panel[hidden], .ts-cookie-panel [hidden] {
    display: none !important;
}

.ts-cookie-panel, .ts-cookie-panel * {
    box-sizing: border-box;
}

.ts-cookie-panel {
    position: fixed;
    z-index: 1000000;
    right: 20px;
    bottom: 20px;
    width: min(520px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    padding: 22px;
    border: 1px solid #52627a;
    border-radius: 16px;
    background: #071a35;
    color: #f4f7fb;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.ts-cookie-panel h2 {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.3;
    color: inherit;
}

.ts-cookie-panel p {
    margin: 0 0 12px;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.ts-cookie-panel a {
    color: #8aead0;
    text-decoration: underline;
}

.ts-cookie-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.ts-cookie-panel button, .ts-cookie-settings {
    min-height: 44px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #9fb0c7;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ts-cookie-panel button:hover {
    background: #173351;
}

.ts-cookie-buttons [data-cookie-customize] {
    grid-column: 1 / -1;
}

.ts-cookie-panel fieldset {
    min-width: 0;
    margin: 16px 0 0;
    padding: 0;
    border: 0;
}

.ts-cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #52627a;
    font-weight: 400;
    cursor: pointer;
}

.ts-cookie-option input {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin: 3px 0;
    accent-color: #31d7a9;
}

.ts-cookie-option span {
    min-width: 0;
}

.ts-cookie-option strong, .ts-cookie-option small {
    display: block;
    color: inherit;
}

.ts-cookie-option small {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.ts-cookie-settings {
    display: block;
    max-width: calc(100% - 32px);
    margin: 18px auto 80px;
    color: #adb2bd;
}

.ts-cookie-panel :focus-visible, .ts-cookie-settings:focus-visible {
    outline: 3px solid #31d7a9;
    outline-offset: 3px;
}

html.white-mode .ts-cookie-panel {
    background: #fff;
    color: #18283e;
    border-color: #c6cfdd;
}

html.white-mode .ts-cookie-panel button {
    border-color: #52627a;
}

html.white-mode .ts-cookie-panel button:hover {
    background: #e9effa;
}

html.white-mode .ts-cookie-panel a {
    color: #126b56;
}

html.white-mode .ts-cookie-option {
    border-color: #c6cfdd;
}

html.white-mode .ts-cookie-settings {
    color: #52627a;
}

@media (max-width: 575px) {
    .ts-cookie-panel {
        left: 12px;
        right: 12px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        width: auto;
        padding: 16px;
        max-height: calc(100vh - 100px);
        max-height: calc(100dvh - 100px);
    }

    .ts-cookie-panel h2 {
        font-size: 18px;
    }
}
