/* Base Styles */
.main-avatar-container {
    margin: 20px;
    width: 98vw;
    display: flex;
}

.avatar-input-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.avatar-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    height: 600px;
}

.avatar-control-container {
    display: flex;
    justify-content: center;
    margin: 20px auto;
    flex-wrap: wrap;
    width: 100%;
}

label {
    box-shadow: none;
    margin: 0;
    padding: 0;
}

.avatar-input {
    width: 200px;
}

.avatar-button-container {
    height: min-content;
    margin: 0;
    display: flex;
    width: 100%;
    gap: 10px;
    padding: 0 10px;
}

.voice-btn-container {
    padding: 0;
}

.tabs-container {
    width: 100%;
    height: min-content;
    padding: 10px;
}

.avatar-button {
    background: #27315d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Dark mode contrast improvements */
body.dark-mode .avatar-button {
    background: #2f3b72; /* slightly brighter than header tone for contrast */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .avatar-button-container,
body.dark-mode .tabs-container,
body.dark-mode #voz {
    background: #161a22;
    border-radius: 8px;
}

body.dark-mode #waveform {
    background-color: #0f1115;
    border-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode #transcript {
    background: #0f1115;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.avatar-chat-container {
    display: flex;
    gap: 10px;
    width: 50%;
}

.avatar-chat-container button {
    width: 100px;
}

.disabled-button {
    background-color: #dcdcdc;
    /* Light gray background */
    color: #6c757d;
    /* Dark gray text */
    cursor: not-allowed;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 16px;
    pointer-events: none;
}

.disabled-button:hover {
    background-color: #dcdcdc;
    color: #6c757d;
}

.tab-content {
    height: min-content;
}

#waveform {
    width: 100%;
    height: 40px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}

#transcript {
    width: 100%;
    height: 100px;
    overflow-y: auto;
    resize: none;
    line-height: 1.5em;
}

#voz {
    width: 100%;
    padding: 10px;
}

#start-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Responsive Adjustments */

/* Tablets and small desktops */
@media (max-width: 768px) {
    .main-avatar-container {
        margin: 10px;
        flex-wrap: wrap;
    }
    .avatar-video-container {
        /* Let the video container adjust height automatically based on width */
        height: auto;
    }
    .avatar-chat-container {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
    .avatar-input {
        width: 90%;
        max-width: 300px;
    }
}

/* Phones */
@media (max-width: 480px) {
    header nav ul {
        flex-direction: column;
        align-items: center;
    }
    header nav ul li {
        margin-bottom: 5px;
    }
    .avatar-input-container,
    .avatar-control-container {
        flex-direction: column;
        align-items: center;
    }
    .avatar-input {
        width: 100%;
        max-width: 300px;
    }
    .avatar-button-container {
        flex-direction: column;
        gap: 10px;
        height: auto;
    }
}
