/* RESPONSIVE */
@container birthday-compose (min-width: 870px) {
    .bc3-layout {
        grid-template-columns:
            minmax(0, 1.65fr) minmax(265px, .82fr);
        /* Колонки вытягиваются на высоту самой высокой панели. */
        align-items: stretch;
    }

    .bc3-layout>.bc3-panel,
    .bc3-layout>.bc3-aside {
        min-height: 100%;
        height: 100%;
    }

    .bc3-aside {
        /* Sticky высокой панели здесь мешает растягиванию и прокрутке. */
        position: static;
        align-self: stretch;
        grid-template-rows: minmax(0, 1fr);
    }

    .bc3-aside>.bc3-aside__panel {
        height: 100%;
        min-height: 100%;
    }
}

@container birthday-compose (max-width: 680px) {
    .bc3-hero {
        padding: 20px 17px;
    }

    .bc3-hero__layout {
        flex-wrap: wrap;
        gap: 14px;
    }

    .bc3-steps {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .bc3-step {
        min-height: 54px;
    }

    .bc3-panel {
        padding: 17px 14px;
    }

    .bc3-help summary {
        padding: 13px;
    }

    .bc3-help__body {
        padding: 2px 13px 15px;
    }
}

@media (max-width: 767px) {
    .birthday-compose-v3 {
        gap: 12px;
    }

    .bc3-form :is(textarea,
        select,
        input:not([type=checkbox]):not([type=radio])) {
        font-size: 16px;
    }

    .bc3-snippet {
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .birthday-compose-v3 *,
    .birthday-compose-v3 *::before,
    .birthday-compose-v3 *::after {
        transition-duration: 0s !important;
    }
}

/* EXPANDED HELP */
.birthday-compose-v3 .bc3-help {
    border-color: #d9d1f5;
    box-shadow: 0 4px 18px rgba(76, 58, 149, .06);
}

.birthday-compose-v3 .bc3-help>summary {
    background: linear-gradient(95deg, #faf8ff 0%, #ffffff 85%);
    border-radius: 13px;
}

.birthday-compose-v3 .bc3-help[open]>summary {
    border-radius: 13px 13px 0 0;
}

.birthday-compose-v3 .bc3-help>summary:hover {
    background: #f5f1ff;
}

.birthday-compose-v3 .bc3-help__toggle-label {
    flex: 0 0 auto;
    color: var(--bc-primary);
    font-size: 13px;
    font-weight: 700;
}

.birthday-compose-v3 .bc3-help__toggle-label::after {
    content: 'Развернуть';
}

.birthday-compose-v3 .bc3-help[open] .bc3-help__toggle-label::after {
    content: 'Свернуть';
}

.birthday-compose-v3 .bc3-help__body {
    padding-top: 18px;
    background: #fff;
}

.birthday-compose-v3 .bc3-help__to-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
    padding: 10px 14px;
    border: 1px solid #ddd6f7;
    border-radius: 9px;
    background: #f7f4ff;
    color: var(--bc-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.birthday-compose-v3 .bc3-help__to-form:hover {
    color: #49398f;
    border-color: #bbadf4;
    background: #f0ebff;
}

/* QUICK INSERTS */
.birthday-compose-v3 .bc3-snippet-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 4px;
    margin-bottom: 11px;
    border: 1px solid #e6e3f0;
    border-radius: 11px;
    background: #f1f0f7;
}

.birthday-compose-v3 .bc3-snippet-tab {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #565d72;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;
}

.birthday-compose-v3 .bc3-snippet-tab:hover {
    color: var(--bc-primary);
}

.birthday-compose-v3 .bc3-snippet-tab.is-active,
.birthday-compose-v3 .bc3-snippet-tab[aria-pressed="true"] {
    background: #fff;
    border-color: #e3def4;
    color: var(--bc-primary);
    box-shadow: 0 1px 4px rgba(50, 40, 75, .05);
}

.birthday-compose-v3 .bc3-snippet-group {
    display: grid;
    gap: 7px;
}

.birthday-compose-v3 .bc3-snippet-group[hidden] {
    display: none !important;
}

.birthday-compose-v3 .bc3-snippet__content {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 4px;
}

.birthday-compose-v3 .bc3-snippet__content strong {
    color: var(--bc-text);
    font-size: 13px;
    line-height: 1.3;
    font-weight: 650;
}

.birthday-compose-v3 .bc3-snippet__content code {
    font-weight: 550;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.birthday-compose-v3 .bc3-snippet:active {
    transform: scale(.99);
}

@container birthday-compose (max-width: 680px) {
    .birthday-compose-v3 .bc3-help__toggle-label {
        display: none;
    }

    .birthday-compose-v3 .bc3-help__body {
        padding-top: 12px;
    }

    .birthday-compose-v3 .bc3-snippet-tab {
        min-height: 42px;
        font-size: 13px;
    }
}

/* DRAFT CLEAR CONTROLS */
.birthday-compose-v3 .bc3-clear {
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid var(--bc-border);
}

.birthday-compose-v3 .bc3-clear__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.birthday-compose-v3 .bc3-clear__copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.birthday-compose-v3 .bc3-clear__copy strong {
    color: var(--bc-text);
    font-size: 13px;
}

.birthday-compose-v3 .bc3-clear__copy span {
    color: var(--bc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.birthday-compose-v3 .bc3-clear__trigger {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
    border: 1px solid #f0d1d1;
    color: #b44747;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.birthday-compose-v3 .bc3-clear__trigger:hover:not(:disabled) {
    background: #fff4f4;
    border-color: #eab3b3;
}

.birthday-compose-v3 .bc3-clear__trigger:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.birthday-compose-v3 .bc3-clear__confirm {
    margin-top: 12px;
    padding: 13px;
    border-radius: 10px;
    border: 1px solid #efcccc;
    background: #fff9f9;
}

.birthday-compose-v3 .bc3-clear__confirm[hidden] {
    display: none !important;
}

.birthday-compose-v3 .bc3-clear__confirm strong {
    display: block;
    margin-bottom: 4px;
    color: #783d3d;
    font-size: 13px;
}

.birthday-compose-v3 .bc3-clear__confirm p {
    margin: 0 0 12px;
    color: #755252;
    font-size: 13px;
    line-height: 1.45;
}

.birthday-compose-v3 .bc3-clear__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.birthday-compose-v3 .bc3-clear__actions button {
    min-height: 36px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.birthday-compose-v3 .bc3-clear__cancel {
    border: 1px solid #dddde6;
    color: #525468;
    background: white;
}

.birthday-compose-v3 .bc3-clear__apply {
    border: 1px solid #b84343;
    background: #b84343;
    color: #fff;
}

.birthday-compose-v3 .bc3-clear__apply:hover {
    background: #9b3434;
}

@container birthday-compose (max-width: 420px) {
    .birthday-compose-v3 .bc3-clear__row {
        align-items: stretch;
        flex-direction: column;
    }

    .birthday-compose-v3 .bc3-clear__trigger {
        width: 100%;
    }
}

.birthday-compose-v3 .form-group label {
    margin: 7px 0 13px;
}

