.sw-msg-shell {
    overflow: hidden;
    border: 1px solid rgba(20, 72, 150, 0.12);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 22px 58px rgba(18, 53, 96, 0.1);
}

.sw-msg-tabs {
    display: grid;
    padding: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    border-bottom: 1px solid #e7ecf3;
    background: #f4f7fb;
}

.sw-msg-tab {
    display: inline-flex;
    min-width: 0;
    min-height: 50px;
    padding: 0 8px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #66758a;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.sw-msg-tab[aria-selected="true"] {
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(18, 53, 96, 0.08);
    color: var(--primary);
}

.sw-msg-tab:focus-visible {
    outline: 3px solid rgba(20, 72, 150, 0.2);
    outline-offset: 1px;
}

.sw-msg-tab__mark {
    display: inline-flex;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.sw-msg-tab__mark--whatsapp {
    background: #168a56;
}

.sw-msg-tab__mark--telegram {
    background: #2788c9;
}

.sw-msg-tab__mark--viber {
    background: #6750a4;
}

.sw-msg-workspace {
    display: grid;
    gap: 28px;
    padding: 22px;
}

.sw-msg-editor,
.sw-msg-result-column,
.sw-msg-panel {
    min-width: 0;
}

.sw-msg-panel[hidden],
.sw-msg-conditional[hidden],
.sw-msg-result__content[hidden],
.sw-msg-result__empty[hidden] {
    display: none;
}

.sw-msg-panel__head {
    margin-bottom: 20px;
}

.sw-msg-panel__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.sw-msg-panel__head h2 {
    margin: 0;
    color: var(--text-main);
    font-size: 21px;
    font-weight: 820;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.sw-msg-panel__head p {
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.58;
}

.sw-msg-form,
.sw-msg-conditional {
    display: grid;
    gap: 17px;
}

.sw-msg-field {
    display: grid;
    gap: 7px;
}

.sw-msg-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    color: #28364a;
    font-size: 13px;
    font-weight: 780;
    line-height: 1.35;
}

.sw-msg-label small {
    color: #8b98aa;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
    text-transform: uppercase;
}

.sw-msg-input,
.sw-msg-select,
.sw-msg-textarea,
.sw-msg-output {
    width: 100%;
    border: 1px solid #dbe3ed;
    border-radius: 11px;
    background: #ffffff;
    color: var(--text-main);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.sw-msg-input,
.sw-msg-select {
    min-height: 48px;
    padding: 0 13px;
}

.sw-msg-select {
    padding-right: 38px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    cursor: pointer;
}

.sw-msg-textarea,
.sw-msg-output {
    min-height: 108px;
    padding: 13px;
    resize: vertical;
}

.sw-msg-input::placeholder,
.sw-msg-textarea::placeholder {
    color: #a4afbd;
}

.sw-msg-input:hover,
.sw-msg-select:hover,
.sw-msg-textarea:hover {
    border-color: #bdcadb;
}

.sw-msg-input:focus,
.sw-msg-select:focus,
.sw-msg-textarea:focus,
.sw-msg-output:focus {
    border-color: rgba(20, 72, 150, 0.56);
    box-shadow: 0 0 0 4px rgba(20, 72, 150, 0.09);
    outline: 0;
}

.sw-msg-field.is-invalid .sw-msg-input,
.sw-msg-field.is-invalid .sw-msg-select,
.sw-msg-field.is-invalid .sw-msg-textarea {
    border-color: #d94c5a;
    box-shadow: 0 0 0 4px rgba(217, 76, 90, 0.08);
}

.sw-msg-hint,
.sw-msg-error,
.sw-msg-field-meta {
    min-height: 17px;
    font-size: 11px;
    line-height: 1.45;
}

.sw-msg-hint {
    color: #7a889c;
}

.sw-msg-error {
    color: #c5303f;
    font-weight: 700;
}

.sw-msg-field-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #7a889c;
}

.sw-msg-field-meta .sw-msg-error {
    flex: 1 1 auto;
}

.sw-msg-note {
    padding: 13px 14px;
    border: 1px solid #dce5f1;
    border-radius: 11px;
    background: #f6f9fd;
    color: #596a80;
    font-size: 12px;
    line-height: 1.55;
}

.sw-msg-note code,
.sw-msg-faq code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eaf0f8;
    color: #35465c;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.92em;
}

.sw-msg-actions,
.sw-msg-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sw-msg-actions .sw-tools-button,
.sw-msg-result__actions .sw-tools-button {
    flex: 1 1 150px;
}

.sw-msg-result {
    min-height: 100%;
    padding: 20px;
    border: 1px solid #e1e8f1;
    border-radius: 16px;
    background: #f7f9fc;
}

.sw-msg-result__empty {
    display: flex;
    min-height: 300px;
    padding: 28px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sw-msg-result__empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: #8aa6cc;
}

.sw-msg-result__empty strong {
    color: #314056;
    font-size: 15px;
    font-weight: 800;
}

.sw-msg-result__empty span {
    max-width: 320px;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.sw-msg-result__service {
    display: inline-flex;
    min-height: 30px;
    padding: 0 10px;
    margin-bottom: 16px;
    align-items: center;
    border: 1px solid rgba(20, 72, 150, 0.12);
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary);
    font-size: 11px;
    font-weight: 820;
}

.sw-msg-result__label {
    display: block;
    margin-bottom: 8px;
    color: #53647b;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sw-msg-output {
    min-height: 126px;
    background: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.sw-msg-result__actions {
    margin-top: 12px;
}

.sw-msg-code-block {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #dfe6ef;
}

.sw-msg-code-block__head {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sw-msg-code-block__head .sw-msg-result__label {
    margin: 0;
}

.sw-msg-code-block__head button {
    padding: 5px 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.sw-msg-code-block__head button:hover {
    color: var(--primary-hover);
}

.sw-msg-output--code {
    min-height: 100px;
    color: #40516a;
}

.sw-msg-result__note {
    margin-top: 15px;
    color: #68788d;
    font-size: 11px;
    line-height: 1.55;
}

.sw-msg-live {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sw-msg-use-grid {
    display: grid;
    gap: 14px;
}

.sw-msg-use-card {
    padding: 22px;
    border: 1px solid #e0e7f0;
    border-radius: 17px;
    background: #f8fafc;
}

.sw-msg-use-card > span {
    display: inline-flex;
    min-width: 34px;
    min-height: 28px;
    padding: 0 8px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e9f1fc;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
}

.sw-msg-use-card h3 {
    margin: 18px 0 0;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 820;
    line-height: 1.3;
}

.sw-msg-use-card p {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.sw-msg-info-layout {
    display: grid;
    gap: 26px;
}

.sw-msg-info-layout .sw-tools-section-head {
    margin-bottom: 0;
}

.sw-msg-faq {
    display: grid;
    gap: 10px;
}

.sw-msg-faq details {
    border: 1px solid #dfe6ef;
    border-radius: 14px;
    background: #ffffff;
}

.sw-msg-faq summary {
    position: relative;
    padding: 17px 46px 17px 17px;
    color: #2d3d52;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    list-style: none;
    cursor: pointer;
}

.sw-msg-faq summary::-webkit-details-marker {
    display: none;
}

.sw-msg-faq summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 17px;
    color: var(--primary);
    font-size: 22px;
    font-weight: 500;
    transform: translateY(-50%);
}

.sw-msg-faq details[open] summary::after {
    content: "−";
}

.sw-msg-faq p {
    padding: 0 17px 17px;
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.65;
}

@media (min-width: 620px) {
    .sw-msg-tab {
        padding: 0 16px;
        font-size: 13px;
    }

    .sw-msg-workspace {
        padding: 28px;
    }

    .sw-msg-use-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 920px) {
    .sw-msg-workspace {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
        gap: 38px;
    }

    .sw-msg-result-column {
        padding-left: 38px;
        border-left: 1px solid #e4eaf2;
    }

    .sw-msg-info-layout {
        grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
        gap: 64px;
        align-items: start;
    }
}

@media (max-width: 420px) {
    .sw-msg-tab {
        flex-direction: column;
        gap: 5px;
        font-size: 10px;
    }

    .sw-msg-workspace {
        padding: 17px;
    }

    .sw-msg-result {
        padding: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sw-msg-tab,
    .sw-msg-input,
    .sw-msg-select,
    .sw-msg-textarea,
    .sw-msg-output {
        transition: none;
    }
}
