/* ==========================================================================
   LAYOUT FIXES - JasonTutor
   ========================================================================== */

/* Fix header responsive - buttons overflow */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--theme-primary);
    color: white;
    flex-wrap: wrap;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-name {
    margin-right: 10px;
    font-weight: 600;
    white-space: nowrap;
}

/* Optimize chat vertical space */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.chat-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0;
}

.input-area {
    flex-shrink: 0;
    padding: 15px;
    background: white;
    border-top: 1px solid #ddd;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header {
        padding: 10px;
    }

    .logo {
        font-size: 16px;
    }

    .user-info {
        width: 100%;
        justify-content: center;
        gap: 5px;
    }

    .user-name {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }

    .btn {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }

    /* Driving Mode mobile */
    #drivingModeModal {
        padding: 10px;
    }

    #drivingMicButton {
        width: 150px !important;
        height: 150px !important;
    }

    #drivingMicButton div:first-child {
        font-size: 48px !important;
    }

    #drivingMicStatus {
        font-size: 12px !important;
    }

    .drivingConversationLog {
        max-height: 100px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }

    #drivingMicButton {
        width: 120px !important;
        height: 120px !important;
    }
}

/* Ensure no horizontal scroll */
body,
html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}
