.expand-field-heading { display:flex; flex-direction:row !important; align-items:center; flex-wrap:wrap; gap:.5rem; }
.business-field { display:flex; flex-direction:column; gap:.35rem; min-width:0; }
.business-field>.expand-field-heading>label { display:block; margin:0; }
.expand-text-button {
    display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center;
    min-height:28px; padding:.2rem .65rem; border:1px solid #bf9500; border-radius:4px;
    background:#ffdf00; color:#211c00; font-size:.8rem; font-weight:800; line-height:1.25; cursor:pointer;
}
.expand-text-button:hover { background:#f2ce00; }
.expand-text-button:focus-visible { outline:3px solid #173b5b; outline-offset:2px; }
@media print { .expand-text-button { display:none; } }
.expanded-text-editor {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #eef3f6;
    color: #152433;
}

.expanded-text-toolbar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(11rem, auto) minmax(0, 1fr);
    align-items: center;
    gap: .75rem 1rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid #aebdca;
    background: #102332;
    color: #fff;
}

.expanded-text-title {
    display: grid;
    gap: .08rem;
    min-width: 0;
}

.expanded-text-title span {
    color: #a9bdca;
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.expanded-text-title strong {
    overflow: hidden;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expanded-text-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .5rem;
}

.expanded-action {
    min-height: 2.5rem;
    padding: .5rem .85rem;
    border: 0;
    border-radius: 5px;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.expanded-action:disabled {
    cursor: wait;
    opacity: .5;
}

.expanded-action.correct { background: #f1b900; color: #171300; }
.expanded-action.translate { background: #1769aa; }
.expanded-action.speak { background: #16804a; }
.expanded-action.dictate { background: #c94d13; }
.expanded-action.dictate.is-listening {
    background: #b12532;
    outline: 3px solid #ffdf6b;
    outline-offset: 2px;
}
.expanded-action.clear { background: #56616c; }
.expanded-action.clear-confirm { background: #9f1f2d; }
.expanded-action.close { background: #b12532; }
.expanded-action.cancel { background: #667581; }

.expanded-clear-confirmation {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .6rem;
    padding: .7rem;
    border-left: 4px solid #f1b900;
    background: #fff6cf;
    color: #3d3300;
}

.expanded-clear-confirmation strong {
    margin-right: auto;
}

.expanded-language-picker {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(12rem, 1fr) auto auto;
    align-items: center;
    gap: .55rem;
    padding-top: .65rem;
    border-top: 1px solid rgba(255, 255, 255, .2);
}

.expanded-language-picker label {
    margin: 0;
    font-weight: 800;
}

.expanded-language-picker .form-control {
    min-height: 2.5rem;
}

.expanded-text-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: .6rem;
    padding: 1rem;
}

.expanded-text-area {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 1rem;
    border: 2px solid #72899a;
    border-radius: 6px;
    background: #fff;
    color: #17212b;
    font: inherit;
    font-size: 1.3rem;
    line-height: 1.55;
    resize: none;
}

.expanded-text-area:focus {
    border-color: #1778c8;
    outline: 3px solid rgba(23, 120, 200, .2);
}

.expanded-text-message {
    flex: 0 0 auto;
    padding: .65rem .8rem;
    border-left: 4px solid #1f7a4d;
    background: #dff4e8;
    color: #135334;
    font-weight: 700;
}

.expanded-text-message.is-error {
    border-left-color: #b12532;
    background: #fde7e9;
    color: #8d1722;
}

body:has(.expanded-text-editor) {
    overflow: hidden;
}

@media (max-width: 720px) {
    .expanded-text-toolbar {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        padding: .65rem;
    }

    .expanded-text-actions {
        justify-content: stretch;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .expanded-action {
        width: 100%;
        padding-inline: .35rem;
    }

    .expanded-language-picker {
        grid-column: 1;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .expanded-language-picker label,
    .expanded-language-picker select {
        grid-column: 1 / -1;
    }

    .expanded-text-body {
        padding: .65rem;
    }

    .expanded-text-area {
        padding: .75rem;
        font-size: 1.15rem;
    }
}

