/* Patient Voice - Enhanced Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #e8dcc4 0%, #d4c5a9 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: #fdfbf7;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 95%;
    border: 1px solid #d4c5a9;
}

.header {
    background: linear-gradient(to bottom, #f5f1e8, #ebe4d5);
    color: #3a3226;
    padding: 30px;
    text-align: center;
    border-bottom: 2px solid #c9b896;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header .subtitle {
    font-size: 1.1em;
    opacity: 0.8;
    color: #5a4d3a;
    font-weight: 400;
}

.main-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 30px;
    padding: 30px;
}

@media (min-width: 1400px) {
    .main-content {
        grid-template-columns: 7fr 3fr;
        gap: 40px;
    }
}

/* Left Panel - Conversation */
.conversation-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.status-bar {
    background: #f5f1e8;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d4c5a9;
    color: #3a3226;
    font-weight: 500;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6b8e23;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-indicator.listening {
    background: #c17817;
    animation: pulse 0.5s infinite;
}

.status-indicator.speaking {
    background: #5a7a9e;
    animation: pulse 0.8s infinite;
}

/* Voice Level Indicator */
.voice-level-container {
    display: flex;
    align-items: center;
}

.voice-level-bar {
    width: 100px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.voice-level-fill {
    height: 100%;
    background: linear-gradient(90deg, #6b8e23 0%, #c17817 100%);
    transition: width 0.1s ease;
    width: 0%;
}

/* Visual Audio Indicator */
.audio-visualizer {
    background: linear-gradient(to bottom, #3a3226, #2a2419);
    border-radius: 8px;
    padding: 30px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid #5a4d3a;
}

@media (min-width: 1400px) {
    .audio-visualizer {
        height: 200px;
        padding: 40px;
    }
}

.soundwave {
    display: flex;
    gap: 4px;
    align-items: center;
    height: 100px;
}

.soundwave .bar {
    width: 4px;
    background: linear-gradient(to top, #c9b896, #8b7355);
    border-radius: 2px;
    transition: height 0.1s ease;
}

.soundwave.active .bar {
    animation: wave 0.6s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { height: 20px; }
    50% { height: 80px; }
}

.soundwave .bar:nth-child(1) { animation-delay: 0s; }
.soundwave .bar:nth-child(2) { animation-delay: 0.1s; }
.soundwave .bar:nth-child(3) { animation-delay: 0.2s; }
.soundwave .bar:nth-child(4) { animation-delay: 0.3s; }
.soundwave .bar:nth-child(5) { animation-delay: 0.4s; }
.soundwave .bar:nth-child(6) { animation-delay: 0.3s; }
.soundwave .bar:nth-child(7) { animation-delay: 0.2s; }
.soundwave .bar:nth-child(8) { animation-delay: 0.1s; }

.ai-bubble {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b7355 0%, #6a5638 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fdfbf7;
    font-size: 2em;
    box-shadow: 0 4px 12px rgba(58, 50, 38, 0.3);
    transition: transform 0.3s ease;
    border: 2px solid #c9b896;
}

.ai-bubble.speaking {
    animation: speak 1s ease-in-out infinite;
}

@keyframes speak {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Conversation Area */
.conversation-area {
    background: #fffef9;
    border-radius: 8px;
    padding: 20px;
    min-height: 500px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #d4c5a9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

@media (min-width: 1400px) {
    .conversation-area {
        min-height: 600px;
        max-height: 700px;
    }
}

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.ai {
    background: #f5f1e8;
    color: #3a3226;
    margin-right: auto;
    border-left: 3px solid #8b7355;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.message.patient {
    background: #e8dcc4;
    color: #3a3226;
    margin-left: auto;
    border-right: 3px solid #6a5638;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.message-role {
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 5px;
    opacity: 0.7;
    color: #5a4d3a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-text {
    line-height: 1.5;
    font-size: 1em;
}

@media (min-width: 1400px) {
    .message-text {
        font-size: 1.1em;
        line-height: 1.6;
    }
}

.message-text strong {
    font-weight: 700;
    color: inherit;
}

/* Triage category highlighting in AI messages */
.message.ai .message-text strong {
    display: inline-block;
    padding: 8px 12px;
    background: #d4c5a9;
    color: #3a3226;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.95em;
    border: 1px solid #8b7355;
}

.message.transcribing {
    opacity: 0.6;
    font-style: italic;
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.input-mode-toggle {
    display: flex;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.input-mode-toggle button {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.input-mode-toggle button.active {
    background: #8b7355;
    color: #fdfbf7;
}

.text-input-area {
    display: none;
    flex: 1;
    gap: 10px;
}

.text-input-area.active {
    display: flex;
}

.text-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1em;
}

.text-input-area input:focus {
    outline: none;
    border-color: #8b7355;
}

button {
    padding: 12px 24px;
    font-size: 1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

@media (min-width: 1400px) {
    button {
        padding: 14px 28px;
        font-size: 1.05em;
    }
}

.btn-primary {
    background: #6b8e23;
    color: #fdfbf7;
    border: 1px solid #5a7319;
}

.btn-primary:hover {
    background: #5a7319;
    transform: translateY(-2px);
}

.btn-danger {
    background: #c17817;
    color: #fdfbf7;
    border: 1px solid #a06313;
}

.btn-danger:hover {
    background: #a06313;
}

.btn-secondary {
    background: #8b7355;
    color: #fdfbf7;
    border: 1px solid #6a5638;
}

.btn-secondary:hover {
    background: #6a5638;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-small {
    padding: 8px 16px !important;
    font-size: 0.9em;
    min-height: 36px;
}

/* Right Panel - Data Display */
.data-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.data-card {
    background: #fffef9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #d4c5a9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.data-card h3 {
    color: #5a4d3a;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
    border-bottom: 2px solid #c9b896;
    padding-bottom: 10px;
}

.data-field {
    margin-bottom: 12px;
}

.data-field label {
    display: block;
    font-size: 0.85em;
    color: #5a4d3a;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-field value {
    display: block;
    color: #3a3226;
    font-size: 0.95em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.transcript-box {
    background: #fffef9;
    border: 1px solid #d4c5a9;
    border-radius: 6px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9em;
    line-height: 1.6;
    color: #3a3226;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.raw-data {
    background: #faf7f0;
    border-left: 4px solid #8b7355;
}

.processed-data {
    background: #f5f1e8;
    border-left: 4px solid #6a5638;
}

/* Responsive */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Loading indicator */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.welcome-message {
    text-align: center;
    color: #5a4d3a;
    padding: 60px 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

.welcome-message h2 {
    color: #3a3226;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Doctor Notes Section */
.doctor-notes-section {
    width: 100%;
}

.doctor-notes-textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #d4c5a9;
    border-radius: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 0.95em;
    line-height: 1.8;
    background: #fffef9;
    resize: vertical;
    color: #3a3226;
}

/* AI Logic Debug Panel */
.ai-logic-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.logic-section {
    border-left: 3px solid #8b7355;
    padding-left: 12px;
    margin-bottom: 10px;
}

.logic-section label {
    display: block;
    font-size: 0.85em;
    font-weight: 700;
    color: #5a4d3a;
    margin-bottom: 5px;
}

.logic-value {
    font-size: 0.9em;
    color: #3a3226;
    padding: 8px 12px;
    background: #faf7f0;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.5;
    border: 1px solid #d4c5a9;
}

.logic-list {
    max-height: 200px;
    overflow-y: auto;
}

.logic-log-item {
    font-size: 0.85em;
    padding: 6px 10px;
    margin-bottom: 4px;
    background: #f5f1e8;
    border-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: #3a3226;
    border: 1px solid #d4c5a9;
}

.logic-log-item:last-child {
    margin-bottom: 0;
}

.logic-log-item.extraction {
    border-left: 3px solid #6b8e23;
}

.logic-log-item.phase-change {
    border-left: 3px solid #5a7a9e;
}

.logic-log-item.template {
    border-left: 3px solid #c17817;
}

/* Conversation Flow Visualization */
.conversation-flow {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 15px 5px;
}

.flow-phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    padding: 10px;
    background: #faf7f0;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid #d4c5a9;
}

.flow-phase.active {
    background: linear-gradient(to bottom, #8b7355, #6a5638);
    color: #fdfbf7;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(106, 86, 56, 0.4);
    border-color: #5a4d3a;
}

.flow-phase.completed {
    background: #e8dcc4;
    border-color: #8b7355;
}

.flow-phase.completed .phase-number {
    background: #6b8e23;
    color: #fdfbf7;
}

.phase-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #8b7355;
    color: #fdfbf7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9em;
    border: 2px solid #6a5638;
}

.flow-phase.active .phase-number {
    background: #fdfbf7;
    color: #3a3226;
    animation: pulse-phase 1.5s ease-in-out infinite;
    border-color: #c9b896;
}

@keyframes pulse-phase {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.phase-name {
    font-size: 0.75em;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.flow-arrow {
    color: #9ca3af;
    font-size: 1.2em;
    font-weight: bold;
}

/* Settings Modal */
.btn-settings {
    background: rgba(139, 115, 85, 0.3);
    color: #3a3226;
    border: 2px solid #8b7355;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-settings:hover {
    background: rgba(139, 115, 85, 0.5);
    transform: translateY(-2px);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fdfbf7;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(58, 50, 38, 0.3);
    animation: slideDown 0.3s ease;
    border: 2px solid #c9b896;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #c9b896;
    background: linear-gradient(to bottom, #f5f1e8, #ebe4d5);
}

.modal-header h2 {
    color: #3a3226;
    margin: 0;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5em;
    color: #5a4d3a;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #e8dcc4;
    color: #3a3226;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid #c9b896;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f5f1e8;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section label {
    display: block;
    font-weight: 600;
    color: #3a3226;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

/* Style Personalization Card */
.style-card {
    background: #fffaf3;
    border: 1px solid #d8c9ae;
}

.style-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.style-card-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #3a3226;
    margin-bottom: 4px;
}

.style-card-description {
    font-size: 0.95em;
    color: #6a5638;
}

.style-recommendations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.style-recommendation-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f0e5d2;
    color: #5a4d3a;
    font-size: 0.85em;
    border: 1px solid #d3c0a0;
}

.style-recommendation-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b8e23;
    display: inline-block;
}

.style-recommendation-pill.muted {
    opacity: 0.7;
}

.style-panel-placeholder {
    padding: 30px;
    border: 2px dashed #d4c5a9;
    border-radius: 10px;
    text-align: center;
    color: #6a5638;
    background: #fffcf7;
    font-style: italic;
}

.style-panel-placeholder p {
    margin-bottom: 16px;
}

.style-placeholder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.style-sample-placeholder-btn {
    border: 1px solid #d3c0a0;
    background: #fff;
    color: #5a4d3a;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-sample-placeholder-btn:hover {
    background: #f7efe0;
}

.style-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 16px;
}

.style-panel-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #3a3226;
}

.style-panel-subtitle {
    font-size: 0.9em;
    color: #76644a;
    margin-top: 4px;
}

.style-panel-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.style-panel-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.style-sample-toggle {
    border: 1px solid #d3c0a0;
    background: #f7efe0;
    color: #5a4d3a;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-sample-toggle.active {
    background: #6b8e23;
    color: #fdfbf7;
    border-color: #5a7319;
}

.style-edit-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border: 1px solid #d6c5ff;
    background: #f4f0ff;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.style-edit-title {
    font-weight: 600;
    color: #3a2b7a;
    margin-bottom: 2px;
}

.style-edit-subtitle {
    font-size: 0.9em;
    color: #5b4d8c;
}

.style-edit-btn {
    border: 1px solid #5b4d8c;
    background: #5b4d8c;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-edit-btn.active {
    background: #3a2370;
    border-color: #3a2370;
}

.style-reset-btn {
    border: 1px solid #cda58a;
    background: transparent;
    color: #6a5638;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.style-reset-btn:hover {
    background: #fcefe3;
    color: #3a3226;
}

.style-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.style-choice-card {
    border: 2px solid #e3d4bc;
    border-radius: 14px;
    padding: 18px;
    background: #fffef9;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 3px 12px rgba(58, 50, 38, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.style-choice-card.active {
    border-color: #8b7355;
    box-shadow: 0 8px 20px rgba(106, 86, 56, 0.2);
    transform: translateY(-4px);
}

.style-choice-label {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b7355;
    font-weight: 600;
}

.style-choice-name {
    font-size: 1.4em;
    font-weight: 700;
    color: #3a3226;
}

.style-choice-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.style-choice-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: #f2e5d1;
    color: #5a4d3a;
    font-size: 0.8em;
    border: 1px solid #dcc6a5;
}

.style-example {
    border: 1px solid #eadfca;
    border-radius: 10px;
    padding: 12px;
    background: #fffcf5;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 320px;
}

.style-example-label {
    font-size: 0.85em;
    font-weight: 600;
    color: #8b7355;
}

.style-example-body {
    flex: 1;
    font-size: 0.9em;
    line-height: 1.6;
    color: #3a3226;
    overflow-y: auto;
    padding-right: 6px;
}

.style-example-tip {
    font-size: 0.8em;
    color: #8b7355;
    margin-bottom: 6px;
}

.style-example-body.editable {
    border: 1px solid #d8c9ae;
    border-radius: 6px;
    padding: 10px;
    min-height: 260px;
    white-space: pre-wrap;
    background: #fff;
    overflow-y: auto;
}

.style-select-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 999px;
    background: #3a3226;
    color: #fdfbf7;
    padding: 10px 16px;
    font-size: 0.95em;
}

.style-select-btn span:first-child {
    font-weight: 600;
}

.style-select-arrow {
    font-size: 1.2em;
}

.style-choice-card.active .style-select-btn {
    background: #6b8e23;
}

.style-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #8b7355;
    color: #fdfbf7;
    font-size: 1.1em;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.style-download-btn:hover {
    background: #6b5840;
    transform: scale(1.05);
}

.style-download-btn:active {
    transform: scale(0.95);
}

.style-empty-message {
    font-size: 0.95em;
    color: #6a5638;
    text-align: center;
}

.style-choice-card button {
    cursor: pointer;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Tablets and smaller (max-width: 968px) */
@media (max-width: 968px) {
    body {
        padding: 10px;
    }

    .container {
        width: 100%;
        border-radius: 8px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .header .subtitle {
        font-size: 1em;
    }

    /* Navigation - stack and wrap */
    .nav-bar {
        padding: 12px 15px !important;
        gap: 10px !important;
    }

    .nav-bar a {
        font-size: 0.9em;
        padding: 6px 12px !important;
    }

    /* Main content grid - already handled above */
    .main-content {
        padding: 20px;
        gap: 20px;
    }

    /* Buttons - slightly smaller */
    button {
        padding: 10px 20px;
        font-size: 0.95em;
    }

    /* Data cards */
    .data-card {
        padding: 15px;
    }

    .data-card h3 {
        font-size: 1.1em;
    }

    /* Audio visualizer */
    .audio-visualizer {
        height: 150px;
        padding: 20px;
    }

    /* Conversation area */
    .conversation-area {
        min-height: 400px;
        max-height: 500px;
    }

    /* Message bubbles */
    .message {
        max-width: 90%;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        max-width: 500px;
    }

    .modal-header, .modal-body, .modal-footer {
        padding: 15px 20px;
    }

    /* Conversation flow - enable scroll */
    .conversation-flow {
        overflow-x: auto;
        padding: 10px 5px;
    }

    .flow-phase {
        min-width: 70px;
        padding: 8px;
    }

    .phase-number {
        width: 28px;
        height: 28px;
        font-size: 0.85em;
    }

    .phase-name {
        font-size: 0.7em;
    }

    /* Style choice grid */
    .style-choice-grid {
        grid-template-columns: 1fr;
    }
}

/* Standard phones (max-width: 768px) */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.75em;
    }

    .header .subtitle {
        font-size: 0.95em;
    }

    /* Navigation - wrap better on small screens */
    .nav-bar a {
        font-size: 0.85em;
        padding: 6px 10px !important;
    }

    /* Controls - stack vertically */
    .controls {
        flex-direction: column;
        gap: 10px;
    }

    .controls button {
        width: 100%;
        min-height: 48px; /* Touch-friendly */
    }

    /* Input mode toggle */
    .input-mode-toggle {
        width: 100%;
    }

    .input-mode-toggle button {
        flex: 1;
        padding: 12px;
    }

    /* Text input area */
    .text-input-area {
        flex-direction: column;
    }

    .text-input-area input {
        width: 100%;
    }

    .text-input-area button {
        width: 100%;
    }

    /* Audio visualizer */
    .audio-visualizer {
        height: 120px;
        padding: 15px;
    }

    .ai-bubble {
        width: 80px;
        height: 80px;
        font-size: 1.5em;
    }

    /* Main content */
    .main-content {
        padding: 15px;
        gap: 15px;
    }

    /* Message text */
    .message-text {
        font-size: 0.95em;
    }

    .message {
        padding: 10px 14px;
        max-width: 95%;
    }

    /* Data fields */
    .data-field label {
        font-size: 0.8em;
    }

    .data-field value {
        font-size: 0.9em;
    }

    /* Transcript boxes */
    .transcript-box {
        max-height: 150px;
        font-size: 0.85em;
    }

    /* Button groups - stack */
    .data-card .btn-small,
    .action-bar .btn,
    .modal-footer button {
        margin: 5px 0 !important;
    }

    /* Settings modal */
    .btn-settings {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    /* QR code container */
    .qr-code-container {
        margin-top: 20px !important;
        padding: 15px !important;
    }

    .qr-code-container img {
        max-width: 200px !important;
    }

    /* Style panels */
    .style-panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .style-panel-actions {
        width: 100%;
        align-items: stretch;
    }

    .style-panel-actions-group {
        width: 100%;
        flex-direction: column;
    }

    .style-panel-actions-group button {
        width: 100%;
    }

    .style-edit-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .style-edit-btn {
        width: 100%;
    }

    /* Placeholder actions */
    .style-placeholder-actions {
        flex-direction: column;
    }

    .style-sample-placeholder-btn {
        width: 100%;
        padding: 12px 18px;
    }
}

/* Small phones (max-width: 480px) */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        border-radius: 6px;
    }

    .header {
        padding: 15px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .header .subtitle {
        font-size: 0.85em;
    }

    /* Navigation - more compact */
    .nav-bar {
        padding: 10px !important;
        gap: 8px !important;
        justify-content: center;
    }

    .nav-bar a {
        font-size: 0.75em;
        padding: 5px 8px !important;
    }

    /* Main content */
    .main-content {
        padding: 10px;
        gap: 10px;
    }

    /* Buttons - full width, larger touch targets */
    button {
        width: 100%;
        min-height: 44px;
        padding: 12px 16px;
        font-size: 0.9em;
    }

    .btn-small {
        min-height: 40px !important;
        font-size: 0.85em !important;
    }

    /* Audio visualizer */
    .audio-visualizer {
        height: 100px;
        padding: 10px;
    }

    .ai-bubble {
        width: 60px;
        height: 60px;
        font-size: 1.2em;
    }

    .soundwave {
        height: 60px;
        gap: 3px;
    }

    .soundwave .bar {
        width: 3px;
    }

    /* Status bar */
    .status-bar {
        padding: 10px;
        font-size: 0.85em;
        flex-wrap: wrap;
    }

    .voice-level-bar {
        width: 80px;
        height: 6px;
    }

    /* Conversation area */
    .conversation-area {
        padding: 15px;
        min-height: 300px;
        max-height: 400px;
    }

    .welcome-message {
        padding: 40px 20px;
    }

    .welcome-message h2 {
        font-size: 1.3em;
    }

    /* Messages */
    .message {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .message-role {
        font-size: 0.75em;
    }

    .message-text {
        font-size: 0.9em;
        line-height: 1.4;
    }

    /* Data cards */
    .data-card {
        padding: 12px;
    }

    .data-card h3 {
        font-size: 1em;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    /* Data fields */
    .data-field {
        margin-bottom: 10px;
    }

    .data-field label {
        font-size: 0.75em;
    }

    .data-field value {
        font-size: 0.85em;
    }

    /* Transcript boxes */
    .transcript-box {
        padding: 10px;
        max-height: 120px;
        font-size: 0.8em;
    }

    /* Doctor notes */
    .doctor-notes-textarea {
        min-height: 150px;
        font-size: 0.85em;
        padding: 12px;
    }

    /* Modal - nearly full screen */
    .modal-content {
        width: 98%;
        margin: 10px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 12px 15px;
    }

    .modal-header h2 {
        font-size: 1.2em;
    }

    /* Settings section */
    .settings-section input {
        font-size: 0.9em !important;
        padding: 8px !important;
    }

    /* Conversation flow */
    .conversation-flow {
        gap: 6px;
        padding: 8px 3px;
    }

    .flow-phase {
        min-width: 60px;
        padding: 6px;
    }

    .phase-number {
        width: 24px;
        height: 24px;
        font-size: 0.8em;
    }

    .phase-name {
        font-size: 0.65em;
    }

    .flow-arrow {
        font-size: 1em;
    }

    /* QR code */
    .qr-code-container {
        margin-top: 15px !important;
        padding: 12px !important;
    }

    .qr-code-container img {
        max-width: 180px !important;
    }

    /* Style cards */
    .style-card-heading {
        flex-direction: column;
        gap: 12px;
    }

    .style-card-title {
        font-size: 1.1em;
    }

    .style-card-description {
        font-size: 0.85em;
    }

    .style-recommendations {
        justify-content: flex-start;
    }

    .style-choice-card {
        padding: 14px;
    }

    .style-choice-name {
        font-size: 1.2em;
    }

    .style-example {
        height: 280px;
    }

    .style-example-body {
        font-size: 0.85em;
    }

    /* Logic panel */
    .logic-section label {
        font-size: 0.8em;
    }

    .logic-value {
        font-size: 0.85em;
        padding: 6px 10px;
    }

    .logic-log-item {
        font-size: 0.8em;
        padding: 5px 8px;
    }

    .logic-list {
        max-height: 150px;
    }

    /* Voice level */
    .voice-level-container {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0 !important;
        margin-top: 8px;
    }
}
