.swcc-root,
.swcc-root *,
.swcc-reopen,
.swcc-reopen * {
    box-sizing: border-box;
}

.swcc-root {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .28);
    font-family: inherit;
}

.swcc-panel {
    width: min(1180px, 100%);
    max-height: min(82vh, 760px);
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 18px;
    background: #fff;
    color: #172033;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}

.swcc-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    padding: 24px;
}

.swcc-copy h2,
.swcc-settings-head h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 700;
    line-height: 1.2;
}

.swcc-copy p,
.swcc-settings-head p,
.swcc-option p {
    margin: 0;
    color: #5b6473;
    font-size: 14px;
    line-height: 1.55;
}

.swcc-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.swcc-btn,
.swcc-icon-btn,
.swcc-reopen {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.swcc-btn {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}

.swcc-btn:hover {
    transform: translateY(-1px);
}

.swcc-btn:focus-visible,
.swcc-icon-btn:focus-visible,
.swcc-reopen:focus-visible,
.swcc-switch input:focus-visible + .swcc-slider,
.swcc-links a:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .35);
    outline-offset: 2px;
}

.swcc-btn-primary {
    background: #111827;
    color: #fff;
    box-shadow: 0 7px 18px rgba(17, 24, 39, .18);
}

.swcc-btn-primary:hover {
    background: #000;
}

.swcc-btn-secondary {
    border: 1px solid #d6dae1;
    background: #fff;
    color: #1f2937;
}

.swcc-btn-secondary:hover {
    border-color: #aeb5c1;
    background: #f8fafc;
}

.swcc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    color: #8a93a1;
    font-size: 12px;
}

.swcc-links a {
    color: #4b5563;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.swcc-panel-settings {
    width: min(720px, 100%);
    padding: 24px;
}

.swcc-settings-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: start;
    margin-bottom: 18px;
}

.swcc-icon-btn {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: #f2f4f7;
    color: #111827;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
}

.swcc-options {
    overflow: hidden;
    margin: 18px 0;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.swcc-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 17px;
    border-bottom: 1px solid #e5e7eb;
}

.swcc-option:last-child {
    border-bottom: 0;
}

.swcc-option-copy label {
    display: block;
    margin: 0 0 3px;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.swcc-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
}

.swcc-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.swcc-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #c8ced7;
    transition: background-color .18s ease;
}

.swcc-slider::before {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .24);
    content: '';
    transition: transform .18s ease;
}

.swcc-switch input:checked + .swcc-slider {
    background: #111827;
}

.swcc-switch input:checked + .swcc-slider::before {
    transform: translateX(20px);
}

.swcc-switch input:disabled + .swcc-slider {
    background: #6b7280;
    cursor: not-allowed;
    opacity: .7;
}

.swcc-settings-actions {
    margin-top: 20px;
}

.swcc-reopen {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2147482000;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .18);
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 760px) {
    .swcc-root {
        padding: 10px;
    }

    .swcc-panel {
        border-radius: 15px;
    }

    .swcc-main {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 19px;
    }

    .swcc-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .swcc-btn {
        width: 100%;
    }

    .swcc-panel-settings {
        padding: 18px;
    }

    .swcc-option {
        padding: 15px;
    }

    .swcc-settings-actions {
        grid-template-columns: 1fr;
    }

    .swcc-reopen {
        right: 12px;
        bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .swcc-btn,
    .swcc-slider,
    .swcc-slider::before {
        transition: none;
    }
}
