/* ===== INPUT STACK (drawer + compose) ===== */
.input-stack {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}


/* ===== OPTION DRAWER ===== */
.option-drawer {
    display: flex;
    flex-direction: column;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.22s ease;
    border-bottom: 1px solid transparent;
}

.option-drawer.is-open {
    max-height: min(42vh, 360px);
    opacity: 1;
    pointer-events: auto;
    border-bottom-color: rgba(0, 5, 133, 0.08);
}

.dark-mode .option-drawer.is-open {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.option-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 8px;
    flex-shrink: 0;
}

.option-drawer__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.dark-mode .option-drawer__title {
    color: var(--secondary);
}

.option-drawer__close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 5, 133, 0.07);
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: background 0.18s, transform 0.15s;
}

.option-drawer__close:hover {
    background: rgba(0, 5, 133, 0.14);
    transform: scale(1.05);
}

.dark-mode .option-drawer__close {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
}

.dark-mode .option-drawer__close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.option-drawer__close-svg {
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

.option-drawer__search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 14px 8px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(0, 5, 133, 0.05);
    border: 1px solid rgba(0, 5, 133, 0.1);
    flex-shrink: 0;
}

.dark-mode .option-drawer__search-wrap {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.option-drawer__search-icon {
    display: flex;
    align-items: center;
    color: var(--text-secondary-light);
    flex-shrink: 0;
}

iconify-icon.option-drawer__search-iconify {
    width: 16px;
    height: 16px;
}

.option-drawer__search {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 9px 0;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-light);
    min-width: 0;
}

.dark-mode .option-drawer__search {
    color: var(--text-dark);
}

.option-drawer__search::placeholder {
    color: var(--text-secondary-light);
    opacity: 0.7;
}

.dark-mode .option-drawer__search::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.option-drawer__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 14px 10px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.option-drawer__list {
    max-width: none;
}

.option-drawer__grid {
    max-width: none;
}

.option-drawer--radio.is-open {
    max-height: min(52vh, 440px);
}

.option-drawer__radio-list {
    display: flex;
    flex-direction: column;
}

.option-drawer__radio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 6px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 5, 133, 0.07);
    transition: background 0.15s;
}

.option-drawer__radio-row:last-child {
    border-bottom: none;
}

.option-drawer__radio-row:hover {
    background: rgba(0, 5, 133, 0.04);
}

.option-drawer__radio-row--selected {
    background: rgba(0, 5, 133, 0.06);
}

.option-drawer__radio-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.option-drawer__radio-dot {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0, 5, 133, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.option-drawer__radio-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    transform: scale(0);
    transition: transform 0.15s ease;
}

.option-drawer__radio-row--selected .option-drawer__radio-dot {
    border-color: var(--primary);
}

.option-drawer__radio-row--selected .option-drawer__radio-dot::after {
    transform: scale(1);
}

.option-drawer__radio-label {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-light);
    word-break: break-word;
}

.dark-mode .option-drawer__radio-row {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

.dark-mode .option-drawer__radio-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.dark-mode .option-drawer__radio-row--selected {
    background: rgba(255, 255, 255, 0.06);
}

.dark-mode .option-drawer__radio-dot {
    border-color: rgba(255, 255, 255, 0.28);
}

.dark-mode .option-drawer__radio-row--selected .option-drawer__radio-dot {
    border-color: var(--secondary);
}

.dark-mode .option-drawer__radio-row--selected .option-drawer__radio-dot::after {
    background: var(--secondary);
}

.dark-mode .option-drawer__radio-label {
    color: rgba(255, 255, 255, 0.9);
}

.option-drawer__custom-range {
    margin-top: 10px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 5, 133, 0.04);
    border: 1px solid rgba(0, 5, 133, 0.1);
}

.dark-mode .option-drawer__custom-range {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.option-drawer__custom-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.option-drawer__custom-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.option-drawer__custom-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary-light);
}

.dark-mode .option-drawer__custom-label {
    color: rgba(255, 255, 255, 0.5);
}

.option-drawer__custom-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(0, 5, 133, 0.14);
    background: rgba(255, 255, 255, 0.65);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-sizing: border-box;
}

.option-drawer__custom-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 5, 133, 0.1);
}

.dark-mode .option-drawer__custom-input {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-dark);
}

.dark-mode .option-drawer__custom-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(233, 193, 118, 0.12);
}

.option-drawer__custom-error {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #e74c3c;
    text-align: center;
}

.option-drawer__footer--split {
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(0, 5, 133, 0.08);
}

.dark-mode .option-drawer__footer--split {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.option-drawer__actions.suggest-widget__actions {
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.option-drawer__skip.suggest-widget__change {
    flex: 1;
    width: auto;
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    text-align: center;
}

.option-drawer__submit.suggest-widget__yes {
    flex: 1;
    width: auto;
    padding: 12px 14px;
    text-align: center;
    background: none;
    color: #2832a8;
    box-shadow: none;
    transition: opacity 0.18s, transform 0.15s;
}

.option-drawer__submit.suggest-widget__yes:not(:disabled):hover {
    transform: translateY(-1px);
    opacity: 0.88;
}

.option-drawer__submit.suggest-widget__yes:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.dark-mode .option-drawer__submit.suggest-widget__yes {
    background: none;
    color: #e9c176;
}

.dark-mode .option-drawer__skip.suggest-widget__change:not(:disabled):hover {
    color: rgba(255, 255, 255, 0.88);
}

[dir="rtl"] .option-drawer__actions.suggest-widget__actions {
    flex-direction: row-reverse;
}

.option-drawer__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-drawer__pill {
    padding: 9px 14px;
    border-radius: 999px;
    border: 1.5px solid rgba(0, 5, 133, 0.14);
    background: rgba(0, 5, 133, 0.04);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, transform 0.12s;
}

.option-drawer__pill:not(:disabled):hover {
    background: rgba(0, 5, 133, 0.1);
    border-color: rgba(0, 5, 133, 0.28);
    transform: translateY(-1px);
}

.option-drawer__pill--chosen {
    background: linear-gradient(135deg, var(--primary) 0%, #2832a8 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.option-drawer__pill:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.dark-mode .option-drawer__pill {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.88);
}

.dark-mode .option-drawer__pill:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(233, 193, 118, 0.35);
}

.option-drawer__more {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 9px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 5, 133, 0.05);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s;
}

.option-drawer__more:hover {
    background: rgba(0, 5, 133, 0.1);
}

.dark-mode .option-drawer__more {
    background: rgba(255, 255, 255, 0.06);
    color: var(--secondary);
}

.dark-mode .option-drawer__more:hover {
    background: rgba(255, 255, 255, 0.1);
}

.option-drawer__empty {
    text-align: center;
    padding: 16px 8px;
    font-size: 13px;
    color: var(--text-secondary-light);
}

.option-drawer__footer {
    display: flex;
    gap: 8px;
    padding: 0 14px 12px;
    flex-shrink: 0;
}

.option-drawer__footer-btn {
    flex: 1;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid rgba(0, 5, 133, 0.14);
    background: transparent;
    color: var(--text-secondary-light);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.option-drawer__footer-btn:hover {
    background: rgba(0, 5, 133, 0.05);
    color: var(--primary);
}

.option-drawer__footer-btn--skip {
    border-style: dashed;
}

.dark-mode .option-drawer__footer-btn {
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
}

.dark-mode .option-drawer__footer-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--secondary);
}

/* ===== INPUT AREA ===== */
.input-area {
    padding: 10px 16px 14px;
    display: flex;
    flex-shrink: 0;
}



.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    border-radius: 26px;
    padding: 5px 5px 5px 16px;
    direction: ltr;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
[dir="rtl"] .input-wrapper {
    direction: rtl;
    padding: 5px 16px 5px 5px;
}

.dark-mode .input-wrapper {
    background: rgba(255,255,255,0.04);
    box-shadow: 0 1px 8px rgba(0,0,0,0.25);
}


.input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    background: none;
    padding: 8px 0;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-light);
    min-width: 0;
}

.dark-mode .input-wrapper input {
    color: var(--text-dark);
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
    color: var(--text-secondary-light);
    opacity: 0.6;
}
.dark-mode .input-wrapper input::placeholder,
.dark-mode .input-wrapper textarea::placeholder {
    color: rgba(255,255,255,0.3);
}
[dir="rtl"] .input-wrapper textarea,
[dir="rtl"] .input-wrapper input {
    text-align: right;
    direction: rtl;
}
[dir="rtl"] .input-wrapper textarea::placeholder,
[dir="rtl"] .input-wrapper input::placeholder {
    text-align: right;
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, #1a237e 55%, #2a3eb1 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 5, 133, 0.4);
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 18px rgba(0, 5, 133, 0.55);
}

.send-btn:active {
    transform: scale(0.92);
}

.dark-mode .send-btn {
    box-shadow: 0 2px 12px rgba(0, 5, 133, 0.6);
}
