.ai-layout{
    display: flex;
    width: 100%;
}
.ai-left{
    flex: 1 1 0;
}
.ai-right{
    flex: 1 1 0;
}
.ai-mid {
    width: 700px;
    margin: 0 auto;
    margin-bottom: -35px;
    background: white;
    /*background: #f6f7f9;*/
    -webkit-border-bottom-left-radius: 15px;
    -moz-border-bottom-left-radius: 15px;
    border-bottom-left-radius: 15px;
    -webkit-border-bottom-right-radius: 15px;
    -moz-border-bottom-right-radius: 15px;
    border-bottom-right-radius: 15px;
}
.ai-mid-top {
    height: calc(100vh - 192px);
    overflow: hidden;
    overflow-y: auto;
    font-size: 14px;
}

.ai-mid-bottom {
    height: 100px;
}
.ai-mid-bottom-i{
    height: 100px;
    border: solid 1px #e1dae9;
    border-bottom: 0;
    border-right: 0;
    border-left: 0;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;
    background: white;
}
.ai-mid-bottom-i.in-progress{
    background: #fbfbfb;
}
.ai-mid-bottom-i.in-progress .ai-input-area{
    display: none;
}
.ai-rec-area,
.ai-input-area{
    height: 37px;
    max-height: 37px;
    overflow: hidden;
    overflow-y: auto;
    padding: 15px;
    font-size: 16px;
    letter-spacing: 0.5px;
    color: #444444;
}
.ai-input-area[contenteditable="true"]:empty::before {
    content: attr(data-placeholder);
    color: #666666;
    pointer-events: none;
}
.ai-agent-btn-close,
.ai-agent-btn,
.ai-voice-btn,
.ai-send-btn{
    width: 30px;
    height: 30px;
    line-height: 30px;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    background: #888888;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    cursor: pointer;
}
.ai-agent-btn-close{
    background: none;
}
.ai-agent-btn{
    background: none;
}
.ai-send-btn:hover{
    background: #666666;
    transform: scale(1.1);
}
.ai-voice-btn{
    background: none;
}
.ai-voice-btn-check-in-progress,
.ai-voice-btn-check,
.ai-voice-btn-close{
    width: 30px;
    height: 30px;
    line-height: 30px;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    cursor: pointer;
}
.ai-voice-btn-check-in-progress{
    cursor: default;
}
.ai-agent-btn-close:hover,
.ai-agent-btn:hover,
.ai-voice-btn:hover {
    background: #cccccc;
    transform: scale(1.1);
}
.ai-send-btn .icon-white{
    color: white;
}
.icons8-dots-loading {
    width: 30px;
    height: 30px;
    background-image: url("../../../images/v1/icons8-dots-loading.gif");
    background-repeat: no-repeat;
    background-position: 0 0;
}
.ai-mid-result-area .ai-res-line{
    margin-bottom: 20px;
}
.ai-req-area{
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}
.ai-req-text{
    padding: 3px 10px;
    background: #F5F5F5;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;
    display: inline-block;
}
.ai-res-text{
    padding: 3px 10px;
    /*background: #E1BEE7;*/
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;
    display: inline-block;
}

.ai-voice-btn svg {
    width: 20px;
    height: 20px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.ai-teachers-title{
    color: #666666;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-top: 15px;
}
.ai-teachers-btn{
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 9px;
    height: 16px;
}
.ai-teachers-btn a{
    color: #00a651;
    text-decoration: none;
}
.ai-teachers-btn a:hover{
    text-decoration: underline;
}
.ai-teachers{
    margin-top: 15px;
    margin-left: 5px;
}
.ai-teachers img{
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
}
.ai-teachers .name{
    font-size: 14px;
    color: #666666;
    margin-bottom: 5px;
}
.ai-teachers .name{
    display: block;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}
.ai-teachers .title{
    font-size: 12px;
    color: #999999;
}
.ai-teachers .teacher .pl-10{
    width: calc(100% - 75px);
}
.ai-teachers .title{
    display: block;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}
.ai-teachers .teacher{
    padding: 3px 0 3px 3px;
    border-left: solid 3px transparent;
    display: block;
    margin: 5px 0;
    cursor: pointer;
}
.ai-teachers .teacher.active{
    background: white;
    border-left: solid 3px #777777;
}

.recording-wave {
    /* Optional: control overall size via font-size */
    display: inline-block;
}
.recording-wave__line {
    stroke-dasharray: 100;  /* bigger = longer animation loop */
    animation: recording-wave-move 1.2s linear infinite;
}
@keyframes recording-wave-move {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -100; }
}
.settings-gear__body {
    transform-origin: 50% 50%;
    animation: gear-rotate 2s linear infinite;
}
@keyframes gear-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========================================================================== */
/* AI Dasatoo (/aidasatoo) – modern UX overrides (CSS-only, additive)         */
/* ========================================================================== */

.ai-layout{
    gap: 12px;
    align-items: stretch;
    padding: 2px 0 0 0;
    box-sizing: border-box;
}

/* Center column as a proper chat surface */
.ai-mid{
    width: min(780px, 100%);
    margin: 0 auto;
    background: #ffffff;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    border: solid 1px rgba(17, 24, 39, 0.10);
    box-shadow:
        0 0 0 1px rgba(17, 24, 39, 0.02),
        0 10px 22px rgba(17, 24, 39, 0.06);
    overflow: hidden;
}
.ai-mid-top{
    height: calc(100vh - 195px);
}

/* Teachers (left) */
.ai-left{
    flex: 0 0 300px;
    max-width: 300px;
}
.ai-teachers{
    margin-left: 0;
}
.ai-teachers .teacher{
    border-left: 0;
    border-radius: 14px;
    padding: 10px;
    margin: 8px 0;
    background: #ffffff;
    border: solid 1px rgba(17, 24, 39, 0.10);
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.ai-teachers .teacher:hover{
    border-color: rgba(17, 24, 39, 0.16);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
}
.ai-teachers .teacher.active{
    border-left: 0;
    border-color: rgba(75, 0, 130, 0.28);
    box-shadow:
        0 0 0 2px rgba(75, 0, 130, 0.10),
        0 10px 22px rgba(17, 24, 39, 0.08);
}
.ai-teachers .img img{
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: solid 1px rgba(17, 24, 39, 0.12);
    object-fit: cover;
    display: block;
    background: #ffffff;
}
.ai-teachers .name{
    color: #111827;
    font-weight: 800;
}
.ai-teachers .title{
    color: #6b7280;
}
.ai-teachers-title{
    color: #111827;
}
.ai-teachers-btn a{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: solid 1px rgba(17, 24, 39, 0.10);
    background: #ffffff;
    color: #111827;
    font-weight: 700;
}
.ai-teachers-btn a:hover{
    text-decoration: none;
    background: rgba(17, 24, 39, 0.04);
}

/* Message bubbles */
.ai-req-area{
    margin-bottom: 12px;
}
.ai-req-text{
    max-width: min(560px, 92%);
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(75, 0, 130, 0.08);
    border: solid 1px rgba(75, 0, 130, 0.18);
    color: #111827;
    line-height: 1.55;
}
.ai-res-line{
    margin-bottom: 16px;
}
.ai-res-text{
    max-width: min(620px, 92%);
    padding: 10px 12px;
    border-radius: 14px;
    background: #ffffff;
    border: solid 1px rgba(17, 24, 39, 0.10);
    color: #111827;
    line-height: 1.55;
    display: inline-block;
}

.ai-res-text .w { padding:0 1px; border-radius:4px; }
.ai-res-text .w.active { background: rgba(11,116,222,.22); }
.ai-res-text .w.hidden { display:none; }

/* Composer */
.ai-mid-bottom-i{
    border-top: solid 1px rgba(17, 24, 39, 0.10);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 0;
    height: auto;
    padding: 10px 10px 12px 10px;
    box-sizing: border-box;
}
.ai-input-area{
    height: auto;
    max-height: 140px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #ffffff;
    box-sizing: border-box;
    letter-spacing: 0;
}
.ai-input-area:focus{
    outline: none;
}
.ai-input-area[contenteditable="true"]:empty::before{
    color: #9ca3af;
}

.ai-btn-area{
    margin-top: 10px;
}
.ai-agent-btn-close,
.ai-agent-btn,
.ai-voice-btn,
.ai-send-btn{
    background: rgba(17, 24, 39, 0.04);
    border: solid 1px rgba(17, 24, 39, 0.10);
    border-radius: 999px;
    transition: background-color 140ms ease, transform 140ms ease, border-color 140ms ease;
}
.ai-agent-btn-close:hover,
.ai-agent-btn:hover,
.ai-voice-btn:hover,
.ai-send-btn:hover{
    background: rgba(17, 24, 39, 0.08);
    border-color: rgba(17, 24, 39, 0.16);
    transform: scale(1.06);
}

/* Responsive: stack columns */
@media (max-width: 980px){
    .ai-layout{
        flex-direction: column;
    }
    .ai-left,
    .ai-right{
        max-width: none;
        flex: 0 0 auto;
        width: 100%;
    }
    .ai-mid{
        width: 100%;
    }
}
