chat > dialog > controls {
display: flex;
align-items: center;
gap: 0.6rem;
background: white;
position: absolute;
right: 0;
left: 0;
bottom: 0;
height: 4.5rem;
}

chat > dialog > controls > button[data-action="pin_chat"],
chat > dialog > controls > button[data-action="get_lesson"],
chat > dialog > controls > button[data-action="share_lesson"] {
    position: static !important;
    order: 1;
}

chat > dialog > controls > button[data-action="get_lesson"] {
    order: 2;
}

chat > dialog > controls > button[data-action="share_lesson"] {
    order: 3;
}

chat > dialog > controls > button[data-action="record_audio_message"],
chat > dialog > controls > button[data-action="toggle_record_pause"],
chat > dialog > controls > meta-recording[data-role="record-indicator"],
chat > dialog > controls > meta-time[data-role="record-timer"],
chat > dialog > controls > button[data-action="cancel_recording"],
chat > dialog > controls > input[message],
chat > dialog > controls > button[data-action="send_message"] {
    position: static !important;
    transform: none !important;
}

chat > dialog > controls > button[data-action="record_audio_message"] {
    order: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    flex: 0 0 auto;
    background: none;
position: absolute !important;
}

chat > dialog > controls > button[data-action="toggle_record_pause"] {
    order: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    flex: 0 0 auto;
}

chat > dialog > controls > button[data-action="toggle_record_pause"]::before {
    content: "❚❚";
    font-size: 1.05rem;
    line-height: 1;
}

chat > dialog > controls > button[data-action="toggle_record_pause"][status="resume"]::before {
    content: "▶";
    font-size: 1.15rem;
    margin-left: 0.12rem;
}

chat > dialog > controls > meta-recording[data-role="record-indicator"] {
    order: 5;
    display: inline-flex;
    width: 0.72rem;
    height: 0.72rem;
    min-width: 0.72rem;
    min-height: 0.72rem;
    border-radius: 999px;
    background: #e33232;
    box-shadow: 0 0 0 0.18rem rgba(227, 50, 50, 0.18);
    animation: chat-recording-blink 1s steps(1, end) infinite;
}

chat > dialog > controls > meta-recording[data-role="record-indicator"][paused] {
    animation: none;
    opacity: 0.45;
}

chat > dialog > controls > meta-time[data-role="record-timer"] {
    order: 6;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1;
}

chat > dialog > controls > button[data-action="cancel_recording"] {
    order: 7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.48rem 0.95rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.94rem;
    font-weight: 500;
    flex: 0 0 auto;
}

chat > dialog > controls > input[message] {
    order: 8;
    flex: 1 1 auto;
    width: auto;
    position: absolute !important;
left: 4.5rem;
right: 4.5rem;
    
}

chat > dialog > controls > button[data-action="send_message"] {
    order: 9;
    margin-left: auto;
    position: absolute !important;
right: 1rem;
}

chat > dialog > controls[recording-active] > input[message] {
    display: none !important;
    
}

chat > dialog > controls[recording-active] > button[data-action="record_audio_message"] {
    display: none !important;
}

chat > dialog > controls:not([recording-active]) > button[data-action="toggle_record_pause"],
chat > dialog > controls:not([recording-active]) > meta-recording[data-role="record-indicator"],
chat > dialog > controls:not([recording-active]) > meta-time[data-role="record-timer"],
chat > dialog > controls:not([recording-active]) > button[data-action="cancel_recording"] {
    display: none !important;
}

chat > dialog > controls > waveform[data-role="composer-waveform"] {
    display: none !important;
}

page[dark-theme] chat > dialog > controls > button[data-action="toggle_record_pause"],
page[dark-theme] chat > dialog > controls > button[data-action="cancel_recording"] {
    background: rgba(255, 255, 255, 0.1);
    color: #edf1f7;
}

@keyframes chat-recording-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.2; }
}


button[data-action="send_message"]
{background: none;}