/* VetNearMe Triage Assistant - Styles */

/* ===== CSS Variables ===== */
:root {
    --primary-bg: #FAFAFA;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --accent-calm: #10B981;
    --accent-emergency: #DC2626;
    --accent-urgent: #EA580C;
    --accent-moderate: #CA8A04;
    --accent-low: #2563EB;
    --accent-none: #16A34A;
    --border-light: #E5E7EB;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--primary-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* ===== Header ===== */
.header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-svg {
    height: 40px;
    width: auto;
}

.emergency-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-emergency {
    background-color: var(--accent-emergency);
    color: var(--white);
}

.btn-emergency:hover {
    background-color: #B91C1C;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-routine {
    background-color: var(--accent-calm);
    color: var(--white);
}

.btn-routine:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ===== Main Content ===== */
.main {
    flex: 1;
    padding: 2rem 0;
    min-height: calc(100vh - 80px); /* Full viewport height minus header - pushes vets below fold */
    display: flex;
    flex-direction: column;
}

.disclaimer {
    background-color: #FEF3C7;
    border: 1px solid #FCD34D;
    color: #92400E;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    text-align: center;
}

/* ===== Conversation Display ===== */
.conversation-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
    flex: 1; /* Grow to fill available space */
    display: flex;
    flex-direction: column;
}

.conversation {
    flex: 1; /* Fill parent */
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    scroll-behavior: smooth;
}

.scroll-btn {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--accent-calm);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.2s;
    z-index: 10;
}

.scroll-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.scroll-btn:active {
    transform: translateY(0) scale(0.95);
}

.message {
    margin: 1rem 0;
    padding: 1rem;
    opacity: 1;
    transition: opacity 0.5s ease;
    border-radius: 8px;
}

.message.assistant {
    background-color: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
}

.message.user {
    background-color: #F3F4F6;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.95rem;
}

.message.faded {
    opacity: 0.4;
}

.message.typing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* ===== Assessment Result ===== */
.assessment-result {
    background-color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.urgency-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.urgency-level-1 {
    background-color: var(--accent-emergency);
    color: var(--white);
}

.urgency-level-2 {
    background-color: var(--accent-urgent);
    color: var(--white);
}

.urgency-level-3 {
    background-color: var(--accent-moderate);
    color: var(--white);
}

.urgency-level-4 {
    background-color: var(--accent-low);
    color: var(--white);
}

.urgency-level-5 {
    background-color: var(--accent-none);
    color: var(--white);
}

.recommendation {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.confidence-note {
    background-color: #FEF3C7;
    border-left: 4px solid #F59E0B;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #92400E;
}

/* ===== Care Options ===== */
.care-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.care-btn {
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    background-color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.care-btn:hover {
    border-color: var(--accent-calm);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.care-btn.emergency {
    background-color: var(--accent-emergency);
    color: var(--white);
    border-color: var(--accent-emergency);
}

.care-btn.emergency:hover {
    background-color: #B91C1C;
}

.care-btn.scheduled {
    background-color: var(--accent-calm);
    color: var(--white);
    border-color: var(--accent-calm);
}

.care-btn.scheduled:hover {
    background-color: #059669;
}

.care-btn.virtual {
    background-color: var(--accent-low);
    color: var(--white);
    border-color: var(--accent-low);
}

.care-btn.virtual:hover {
    background-color: #1D4ED8;
}

/* ===== Input Area - ChatGPT Style ===== */
.input-container {
    position: relative;
    background-color: transparent;
    padding: 0;
    max-width: 900px;
    margin: 0 auto;
}

.chatgpt-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border: 1px solid #D1D5DB;
    border-radius: 26px;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chatgpt-input-wrapper:focus-within {
    border-color: #9CA3AF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

#user-input {
    flex: 1;
    border: none;
    font-family: inherit;
    font-size: 16px;
    padding: 0.25rem 0.5rem;
    outline: none;
    background: transparent;
    color: var(--text-primary);
}

#user-input::placeholder {
    color: #9CA3AF;
}

.input-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #6B7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.input-icon-btn:hover {
    background: #F3F4F6;
    color: var(--text-primary);
}

.voice-waveform-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #10B981;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.voice-waveform-btn:hover {
    background: #F0FDF4;
    transform: scale(1.05);
}

/* Hide old input-actions since we're inline now */
.input-actions {
    display: none;
    flex-shrink: 0;
}

/* Media Upload Menu */
.media-upload-menu {
    position: absolute;
    bottom: 60px;
    left: 0;
    background: var(--white);
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    overflow: hidden;
    z-index: 1000;
}

.media-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.media-menu-item:hover {
    background: #F3F4F6;
}

.media-menu-item svg {
    flex-shrink: 0;
    color: #6B7280;
}

.media-menu-item:not(:last-child) {
    border-bottom: 1px solid #F3F4F6;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.icon-btn:hover {
    background: #f3f4f6;
    color: var(--accent-calm);
}

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

.media-btn-left {
    align-self: flex-start;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.send-btn-compact {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--accent-calm);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.send-btn-compact:hover {
    background: #059669;
    transform: translateY(-1px);
}

.send-btn-compact:active {
    transform: translateY(0) scale(0.95);
}

.send-btn-compact:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
}

/* Legacy button styles (for backwards compatibility) */
.send-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-calm);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    align-self: flex-end;
}

.send-btn:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.send-btn:active {
    transform: translateY(0);
}

.send-btn:disabled {
    background-color: #D1D5DB;
    cursor: not-allowed;
    transform: none;
}

/* ===== Media Controls ===== */
.media-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.media-btn {
    padding: 0.5rem 1rem;
    background-color: #F3F4F6;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.media-btn:hover {
    background-color: #E5E7EB;
    border-color: var(--accent-calm);
}

.media-preview {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.media-preview img,
.media-preview video {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border-light);
}

/* ===== Loading Indicator ===== */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    z-index: 1000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-top-color: var(--accent-calm);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Footer ===== */
.footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-light);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer a {
    color: var(--accent-calm);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .main {
        padding: 1rem 0;
    }

    .input-container {
        padding: 1rem;
        margin-top: 0;
    }

    .header-content {
        justify-content: center;
    }

    .emergency-buttons {
        width: 100%;
        justify-content: center;
    }

    .btn {
        flex: 1;
        min-width: 140px;
    }

    .text-input-wrapper {
        flex-direction: column;
    }

    .send-btn {
        align-self: stretch;
    }

    #user-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .conversation {
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .main {
        padding: 0.5rem 0;
    }

    .input-container {
        padding: 0.75rem;
        margin-top: 0;
    }

    .logo-svg {
        height: 32px;
    }

    .disclaimer {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--accent-calm);
    outline-offset: 2px;
}

/* ===== Voice Mode Styles ===== */

/* Voice Toggle Button */
.voice-controls {
    margin-top: 1rem;
    text-align: center;
}

.voice-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.voice-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.voice-toggle-btn:active {
    transform: translateY(0);
}

.voice-icon {
    width: 20px;
    height: 20px;
}

/* Voice Mode Container */
.voice-mode-container {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 24px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.voice-status {
    text-align: center;
    margin-bottom: 2rem;
}

.voice-status-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Voice Record Button (ChatGPT Style) */
.voice-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.voice-record-btn {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-record-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.voice-record-btn:active {
    transform: scale(0.98);
}

.voice-record-btn.recording {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse-recording 1.5s ease-in-out infinite;
}

.voice-record-btn.speaking {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

@keyframes pulse-recording {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(245, 87, 108, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(245, 87, 108, 0.7), 0 0 0 15px rgba(245, 87, 108, 0.2);
    }
}

/* Soundwave Animation (ChatGPT Style) */
.soundwave-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voice-record-btn.recording .soundwave-container,
.voice-record-btn.speaking .soundwave-container {
    opacity: 1;
}

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

.soundwave .bar {
    width: 4px;
    height: 12px;
    background: white;
    border-radius: 2px;
    animation: soundwave-animation 1.2s ease-in-out infinite;
}

.soundwave .bar1 {
    animation-delay: 0s;
}

.soundwave .bar2 {
    animation-delay: 0.1s;
}

.soundwave .bar3 {
    animation-delay: 0.2s;
}

.soundwave .bar4 {
    animation-delay: 0.3s;
}

.soundwave .bar5 {
    animation-delay: 0.4s;
}

@keyframes soundwave-animation {
    0%, 100% {
        height: 12px;
    }
    50% {
        height: 40px;
    }
}

/* Microphone Icon */
.voice-mic-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.voice-record-btn.recording .voice-mic-icon,
.voice-record-btn.speaking .voice-mic-icon {
    opacity: 0;
}

/* Voice Transcript Display */
.voice-transcript {
    max-height: 300px;
    overflow-y: auto;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    margin-top: 2rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

#voice-transcript-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

.voice-transcript-item {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.voice-transcript-item.user {
    background: #e7f3ff;
    color: #0066cc;
    margin-left: 2rem;
}

.voice-transcript-item.assistant {
    background: #f3f4f6;
    color: var(--text-primary);
    margin-right: 2rem;
}

.voice-transcript-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    opacity: 0.7;
}

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

/* Back Button */
.voice-back-btn {
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.voice-back-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    background: #f9fafb;
}

/* COMPACT VOICE MODE - Floating button in corner */
.voice-mode-container-compact {
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

/* Compact voice button - small floating circle */
.voice-record-btn-compact {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-record-btn-compact:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.voice-record-btn-compact:active {
    transform: scale(0.95);
}

.voice-record-btn-compact.recording {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse-recording-compact 1.5s ease-in-out infinite;
}

.voice-record-btn-compact.speaking {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

@keyframes pulse-recording-compact {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
    }
    50% {
        box-shadow: 0 4px 16px rgba(245, 87, 108, 0.7), 0 0 0 8px rgba(245, 87, 108, 0.2);
    }
}

/* Compact soundwave */
.soundwave-container-compact {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.voice-record-btn-compact.recording .soundwave-container-compact,
.voice-record-btn-compact.speaking .soundwave-container-compact {
    opacity: 1;
}

.soundwave-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 30px;
}

.soundwave-compact .bar {
    width: 3px;
    height: 8px;
    background: white;
    border-radius: 2px;
    animation: soundwave-animation 1.2s ease-in-out infinite;
}

.soundwave-compact .bar1 {
    animation-delay: 0s;
}

.soundwave-compact .bar2 {
    animation-delay: 0.15s;
}

.soundwave-compact .bar3 {
    animation-delay: 0.3s;
}

/* Compact mic icon */
.mic-icon-compact {
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.voice-record-btn-compact.recording .mic-icon-compact,
.voice-record-btn-compact.speaking .mic-icon-compact {
    opacity: 0;
}

/* Compact back button - small X */
.voice-back-btn-compact {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border-light);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.voice-back-btn-compact:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    background: #f9fafb;
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .voice-mode-container {
        padding: 1.5rem;
    }

    .voice-record-btn {
        width: 100px;
        height: 100px;
    }

    .voice-mic-icon svg {
        width: 32px;
        height: 32px;
    }

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

    .soundwave .bar {
        width: 3px;
    }

    /* Compact voice mode on mobile */
    .voice-mode-container-compact {
        bottom: 100px;
        right: 16px;
    }

    .voice-record-btn-compact {
        width: 56px;
        height: 56px;
    }

    .voice-back-btn-compact {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* ===== Inline CTA Box (appears after recommendations) ===== */

.inline-cta-box {
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    background: #10B981;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
    animation: slideIn 0.3s ease-out;
    max-width: 100%;
}

.inline-cta-box.emergency {
    background: #DC2626;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
}

.inline-cta-box.urgent {
    background: #10B981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

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

.inline-cta-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inline-cta-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
}

.inline-cta-icon {
    font-size: 1.1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.inline-cta-text {
    flex: 1;
    min-width: 0;
}

.inline-cta-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.1rem 0;
}

.inline-cta-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.inline-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.4rem 0.9rem;
    background: white;
    color: #10B981;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    flex-shrink: 0;
}

.inline-cta-box.emergency .inline-cta-button {
    color: #DC2626;
}

.inline-cta-box.urgent .inline-cta-button {
    color: #10B981;
}

.inline-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.inline-cta-button:active {
    transform: translateY(0);
}

.inline-cta-button svg {
    width: 12px;
    height: 12px;
}

/* Verified Vets Section - Mobile-First Compact Design */
.verified-vets-section {
    padding: 20px 0;
    background: linear-gradient(to bottom, #f9fafb 0%, #ffffff 100%);
    border-top: 2px solid #10B981;
}

.verified-vets-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.verified-vets-grid {
    display: flex;
    gap: 12px;
    max-width: 1000px;
    margin: 0 auto;
}

.verified-vet-card {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border: 2px solid #10B981;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}

.verified-vet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.verified-vet-card.emergency-clinic {
    border: 2px solid #DC2626;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.15);
    background: linear-gradient(to right, #FEF2F2 0%, white 100%);
}

.verified-vet-card.emergency-clinic:hover {
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25);
}

.vet-info {
    flex: 1;
}

.vet-name {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.emergency-badge {
    display: inline-block;
    background: #DC2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.vet-address {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 0;
}

.vet-phone {
    font-size: 13px;
    color: #17A2B8;
    font-weight: 500;
}

.vet-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
}

.verified-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.verified-icon {
    margin-bottom: 0;
}

.verified-text {
    font-size: 9px;
    color: #10B981;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.call-btn {
    background: #10B981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
    white-space: nowrap;
    width: 100%;
}

.call-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.call-btn:active {
    transform: translateY(0);
}

.call-btn.emergency {
    background: #DC2626;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2);
    font-weight: 700;
}

.call-btn.emergency:hover {
    background: #B91C1C;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.book-btn {
    background: #17A2B8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(23, 162, 184, 0.2);
    white-space: nowrap;
    width: 100%;
}

.book-btn:hover {
    background: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(23, 162, 184, 0.3);
}

.book-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .verified-vets-section {
        padding: 16px 0;
    }

    .verified-vets-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .verified-vets-grid {
        flex-direction: column;
        gap: 10px;
    }

    .verified-vet-card {
        width: 100%;
        padding: 10px;
    }

    .vet-name {
        font-size: 13px;
    }

    .vet-address {
        font-size: 11px;
    }

    .vet-actions {
        flex-direction: column;
        margin-left: 8px;
        gap: 5px;
    }

    .call-btn,
    .book-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Disclaimer Footer */
.disclaimer-footer {
    background: #fef3c7;
    border-top: 2px solid #f59e0b;
    border-bottom: 2px solid #f59e0b;
    padding: 16px 0;
    margin-top: 40px;
}

.disclaimer-footer .container {
    font-size: 13px;
    color: #92400e;
    text-align: center;
    line-height: 1.6;
}

/* ===== SIDEBAR MENU ===== */

/* Small menu toggle button - top left corner */
.menu-toggle-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    width: 28px;
    height: 28px;
    padding: 4px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.menu-toggle-btn:hover {
    background: #f9fafb;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.menu-toggle-btn svg {
    width: 18px;
    height: 18px;
    stroke: #374151;
}

/* Sidebar overlay (darkened background) */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: white;
    z-index: 1003;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    transform: translateX(0);
}

/* Sidebar header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.sidebar-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar-close-btn:hover {
    background: #f3f4f6;
}

/* Sidebar actions */
.sidebar-actions {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Chat history list */
.chat-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.chat-history-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.chat-history-item:hover {
    background: #f9fafb;
    border-color: #10B981;
}

.chat-history-item.active {
    background: #ecfdf5;
    border-color: #10B981;
}

.chat-history-date {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.chat-history-preview {
    font-size: 0.85rem;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-history-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}
