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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f6f0eb;
    min-height: 100vh;
    padding: 20px;
    color: #231f20;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* Wider container during call */
.container.call-active {
    max-width: 1000px;
    transition: max-width 0.3s ease;
}

/* Top Bar with Logo and Language */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: nowrap;
    gap: 10px;
}

.sponsor-logo-link {
    display: inline-block;
    transition: opacity 0.2s ease;
}

.sponsor-logo-link:hover {
    opacity: 0.8;
}

.sponsor-logo {
    height: 45px;
    width: auto;
}

/* Custom Language Selector Dropdown */
.language-selector-custom {
    position: relative;
    flex-shrink: 0;
    margin-left: auto;
    z-index: 1000;
}

.lang-dropdown {
    position: relative;
}

.lang-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #231f20;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

.lang-button:hover {
    border-color: #c52d16;
    background-color: #fff8f6;
}

.lang-button:focus {
    outline: none;
    border-color: #c52d16;
    box-shadow: 0 0 0 3px rgba(197, 45, 22, 0.1);
}

.lang-flag {
    font-size: 1.2em;
    line-height: 1;
}

.lang-name {
    flex: 1;
    text-align: left;
}

.lang-arrow {
    transition: transform 0.2s ease;
    color: #666;
}

.lang-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 150px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.lang-dropdown.open .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    color: #231f20;
    font-size: 1em;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.lang-option:hover {
    background-color: #fff8f6;
}

.lang-option:active {
    background-color: #ffe9e4;
}

.lang-option .lang-flag {
    flex-shrink: 0;
}

.lang-option .lang-name {
    flex: 1;
}

/* Hide old selector */
.language-selector {
    display: none;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.2em;
    color: #231f20;
    margin-bottom: 8px;
    font-weight: 600;
}

.subtitle {
    font-size: 1.1em;
    color: #666;
    font-weight: 400;
}

/* ============================================
   INFO CARD DESIGN OPTIONS - Choose one style
   ============================================ */

/* OPTION 1: Ultra Clean (ACTIVE) */
.info-card {
    background: transparent;
    padding: 0;
    margin-bottom: 24px;
    border: none;
}

/* OPTION 2: Subtle Gray Box - Uncomment to use
.info-card {
    background: #fafafa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: none;
}
*/

/* OPTION 3: Minimal Border - Uncomment to use
.info-card {
    background: transparent;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #e0e0e0;
}
*/

/* OPTION 4: Light Background - Uncomment to use
.info-card {
    background: #f9f9f9;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: none;
}
*/

.description {
    font-size: 1em;
    line-height: 1.6;
    color: #333;
    margin-bottom: 0;
}

/* Call Section */
.call-section {
    text-align: center;
    margin: 50px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.call-button {
    background: #c52d16;
    color: white;
    border: none;
    padding: 20px 50px;
    font-size: 1.3em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.call-button:hover {
    background: #a32512;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 45, 22, 0.3);
}

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

.call-button .icon {
    font-size: 1.1em;
}

/* Connecting State with Spinner */
.call-button.connecting {
    background: #a32512;
    cursor: wait;
    pointer-events: none;
}

/* Disable all interactive elements during connection */
body.connecting {
    pointer-events: none;
    user-select: none;
}

/* Allow only the connecting button to be visible (but not clickable) */
body.connecting .call-button.connecting {
    pointer-events: none;
}

/* Keep the connecting button visible */
body.connecting #connectingButton {
    pointer-events: auto;
    cursor: wait;
}

.call-button .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

.hangup-button {
    background: #666;
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1.1em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.hangup-button:hover {
    background: #555;
    transform: translateY(-1px);
}

/* Status Section */
.status-section {
    margin-top: 30px;
}

.status-indicator {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
}

.pulse-ring {
    position: absolute;
    border: 2px solid #c52d16;
    border-radius: 50%;
    height: 100%;
    width: 100%;
    animation: pulse 2s ease-out infinite;
    opacity: 0;
}

.pulse-ring.delay-1 {
    animation-delay: 0.5s;
}

.pulse-ring.delay-2 {
    animation-delay: 1s;
}

@keyframes pulse {
    0% {
        transform: scale(0.1);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.status-text {
    font-size: 1.1em;
    color: #c52d16;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

/* Resources Section */
.resources-section {
    margin-top: 60px;
}

.resources-section h2 {
    font-size: 1.5em;
    color: #231f20;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.category-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    transition: none;
    border: 1px solid #e9ecef;
    cursor: default;
}

.category-card:hover {
    /* No hover effects - cards are informational only */
}

.category-icon {
    font-size: 2.5em;
    margin-bottom: 8px;
}

.category-card h3 {
    font-size: 1em;
    color: #231f20;
    margin-bottom: 4px;
    font-weight: 600;
}

.category-card p {
    color: #666;
    font-size: 0.85em;
}

/* Emergency Section */
.emergency-section {
    background: transparent;
    padding: 0;
    margin-top: 30px;
    text-align: center;
    opacity: 0.5;
}

.emergency-section h3 {
    color: #999;
    margin-bottom: 6px;
    font-size: 0.75em;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.emergency-numbers {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.emergency-number {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    padding: 0;
    text-decoration: none;
    color: #999;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.8em;
}

.emergency-number:hover {
    color: #c52d16;
}

.emergency-number .icon {
    font-size: 0.9em;
}

.emergency-number .text {
    font-size: 0.8em;
    font-weight: 400;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
    color: #666;
    font-size: 0.95em;
}

/* Microphone Warning */
.mic-warning {
    background: #fff8f0;
    border: 1px solid #de974e;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.mic-warning.hidden {
    display: none;
}

.warning-icon {
    font-size: 1.8em;
}

.warning-content h3 {
    color: #8b5a00;
    margin-bottom: 8px;
    font-size: 1.1em;
    font-weight: 600;
}

.warning-content p {
    color: #8b5a00;
    margin-bottom: 12px;
}

.btn-warning {
    background: #de974e;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-warning:hover {
    background: #c8864a;
    transform: translateY(-1px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f8f9fa;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #c52d16;
    color: white;
    transform: rotate(90deg);
}

.modal-content h2 {
    color: #231f20;
    margin-bottom: 16px;
    font-size: 1.6em;
    font-weight: 600;
}

.modal-description {
    font-size: 1em;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
}

.instructions h3 {
    color: #c52d16;
    margin-bottom: 12px;
    font-weight: 600;
}

.instructions ol {
    margin-left: 20px;
    line-height: 1.8;
}

.instructions li {
    margin-bottom: 8px;
}

.instructions strong {
    color: #c52d16;
    font-weight: 600;
}

.help-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.help-buttons button {
    flex: 1;
    min-width: 140px;
}

.btn-primary {
    background: #c52d16;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 0.95em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.btn-primary:hover {
    background: #a32512;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 45, 22, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
    padding: 12px 24px;
    font-size: 0.95em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .top-bar {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        align-items: center;
        min-height: 50px;
    }

    .sponsor-logo {
        height: 35px;
    }

    .language-selector select {
        font-size: 12px;
        padding: 6px 8px;
    }

    h1 {
        font-size: 1.8em;
    }

    .call-button {
        padding: 16px 36px;
        font-size: 1.1em;
        width: 100%;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }

    .category-icon {
        font-size: 2em;
    }

    .emergency-numbers {
        flex-direction: column;
        gap: 8px;
    }
}

/* Accessibility */
button:focus,
a:focus,
select:focus {
    outline: 2px solid #c52d16;
    outline-offset: 2px;
}

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

.container > * {
    animation: fadeIn 0.4s ease-out;
}

/* Usage Limits Info - Minimalist under button */
.usage-limits {
    margin-top: 12px;
    padding: 0;
    background: transparent;
    border: none;
    text-align: center;
}

.usage-limits p {
    font-size: 0.7em;
    color: #999;
    margin: 0;
    line-height: 1.3;
    font-weight: 400;
}

/* Call Modal */
.call-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.call-modal.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: fadeIn 0.3s ease-out;
}

/* Block body scroll when modal is active */
body.modal-open {
    overflow: hidden;
}

.call-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    cursor: default;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Fixed Header */
.modal-fixed-header {
    flex-shrink: 0;
    padding: 24px 32px 16px;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

/* Scrollable Content */
.modal-scrollable-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 32px;
    min-height: 0;
}

/* Fixed Footer */
.modal-fixed-footer {
    flex-shrink: 0;
    padding: 16px 32px 24px;
    background: white;
    border-top: 1px solid #e9ecef;
}

/* Close Button */
.close-modal-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    color: #666;
    font-size: 32px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
}

.close-modal-button:hover {
    background: #c52d16;
    color: white;
    transform: rotate(90deg);
}

.close-modal-button:active {
    transform: rotate(90deg) scale(0.95);
}

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

/* Call Header */
.call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.call-timer-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-label {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

.timer-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #c52d16;
    font-family: 'Monaco', 'Courier New', monospace;
    min-width: 60px;
}

/* Transcript Section */
.transcript-section {
    /* Transcript visible - shows AI responses */
    margin-top: 24px;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
}

.transcript-section h3 {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.transcript-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    min-height: 100px;
    border: none;
}

.transcript-container:empty::before {
    content: 'Waiting for assistant to speak...';
    color: #999;
    font-style: italic;
    font-size: 0.9em;
}

/* ============================================
   AI MESSAGES DESIGN OPTIONS - Choose one style
   ============================================ */

/* OPTION 1: Clean Minimal (ACTIVE) */
.transcript-message {
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    line-height: 1.5;
    animation: messageAppear 0.3s ease-out;
    max-width: 90%;
    box-shadow: none;
}

.ai-message {
    background: #f5f5f5;
    color: #333;
    border: none;
    margin-right: auto;
    font-size: 0.95em;
}

.user-message {
    background: #e8e8e8;
    color: #333;
    border: none;
    margin-left: auto;
    font-size: 0.95em;
}

/* OPTION 2: Bordered Minimal - Uncomment to use
.transcript-message {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    line-height: 1.5;
    animation: messageAppear 0.3s ease-out;
    max-width: 90%;
    box-shadow: none;
}

.ai-message {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    margin-right: auto;
    font-size: 0.95em;
}

.user-message {
    background: white;
    color: #333;
    border: 1px solid #d0d0d0;
    margin-left: auto;
    font-size: 0.95em;
}
*/

/* OPTION 3: Subtle Color - Uncomment to use
.transcript-message {
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 10px;
    line-height: 1.5;
    animation: messageAppear 0.3s ease-out;
    max-width: 88%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ai-message {
    background: #f0f4ff;
    color: #333;
    border: none;
    margin-right: auto;
    font-size: 0.95em;
}

.user-message {
    background: #f5f5f5;
    color: #333;
    border: none;
    margin-left: auto;
    font-size: 0.95em;
}
*/

/* OPTION 4: Ultra Minimal - Uncomment to use
.transcript-message {
    padding: 8px 0;
    border-radius: 0;
    margin-bottom: 12px;
    line-height: 1.6;
    animation: messageAppear 0.3s ease-out;
    max-width: 100%;
    box-shadow: none;
    border-bottom: 1px solid #f0f0f0;
}

.ai-message {
    background: transparent;
    color: #333;
    border: none;
    margin-right: auto;
    font-size: 0.95em;
}

.user-message {
    background: transparent;
    color: #666;
    border: none;
    margin-left: auto;
    font-size: 0.95em;
}
*/

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

/* Scrollbar styling for transcript */
.transcript-container::-webkit-scrollbar {
    width: 6px;
}

.transcript-container::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.transcript-container::-webkit-scrollbar-thumb {
    background: #c52d16;
    border-radius: 4px;
}

.transcript-container::-webkit-scrollbar-thumb:hover {
    background: #a02412;
}

/* Mobile responsive for modal */
@media (max-width: 640px) {
    .call-modal-content {
        width: 95%;
        max-height: 92vh;
    }

    .modal-fixed-header {
        padding: 16px 20px 12px;
    }

    .modal-scrollable-content {
        padding: 0 20px;
    }

    .modal-fixed-footer {
        padding: 12px 20px 16px;
    }

    .call-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .timer-value {
        font-size: 1.3em;
    }
}

/* Push to Talk Button */
.push-to-talk-section {
    text-align: center;
    margin: 0;
}

.push-to-talk-button {
    background: linear-gradient(135deg, #c52d16 0%, #b02514 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 140px;
    height: 140px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 15px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(197, 45, 22, 0.3);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.push-to-talk-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(197, 45, 22, 0.4);
}

.push-to-talk-button:active:not(:disabled),
.push-to-talk-button.active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #a32513 0%, #8f1f11 100%);
    box-shadow: 0 2px 8px rgba(197, 45, 22, 0.5), inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.push-to-talk-button .mic-icon {
    width: 48px;
    height: 48px;
    color: white;
    flex-shrink: 0;
}

.push-to-talk-button .text {
    font-size: 0.85em;
    font-weight: 600;
    margin-top: 0;
    line-height: 1.2;
}

.push-to-talk-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.push-to-talk-hint {
    color: #6c757d;
    font-size: 0.9em;
    margin: 0;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .push-to-talk-button {
        width: 120px;
        height: 120px;
        font-size: 1em;
    }

    .push-to-talk-button .mic-icon {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   INLINE CALL MODE STYLES - REDESIGNED
   ============================================ */

/* Hide elements during active call */
.container.call-active .hide-during-call {
    display: none !important;
}

/* Active Call Interface - hidden by default */
.active-call-interface {
    display: none;
    flex-direction: column;
    gap: 24px;
    margin-top: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    min-height: 60vh;
}

.active-call-interface.visible {
    display: flex;
}

/* ========== COMPACT TIMER AT TOP ========== */
.call-header-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.9em;
}

.timer-icon {
    font-size: 1em;
    opacity: 0.6;
}

.timer-text {
    color: #999;
    font-weight: 400;
    font-size: 0.9em;
}

.timer-value {
    color: #666;
    font-weight: 600;
    font-size: 0.95em;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    min-width: 45px;
}

/* ========== CHAT MESSAGES (AI ONLY) ========== */
.chat-messages {
    flex: 1;
    background: #fafafa;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 32px;
    overflow-y: auto;
    max-height: 500px;
    min-height: 300px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 100%;
}

.chat-placeholder {
    color: #aaa;
    font-style: italic;
    font-size: 1em;
    text-align: center;
    display: block;
    padding: 60px 20px;
}

.chat-container.has-messages .chat-placeholder {
    display: none;
}

/* AI Message Bubble - iMessage style */
.chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: messageSlideIn 0.3s ease-out;
    max-width: 85%;
}

.chat-message-icon {
    flex-shrink: 0;
    font-size: 1.6em;
    line-height: 1;
    margin-top: 2px;
}

.chat-message-content {
    flex: 1;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-radius: 18px 18px 18px 4px;
    font-size: 1.05em;
    line-height: 1.5;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

/* Scrollbar for chat */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c52d16;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a32512;
}

/* ========== VOICE CONTROLS ========== */
.voice-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}

/* Large Circular Mic Button */
.mic-button-large {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c52d16 0%, #a32512 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(197, 45, 22, 0.4);
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.mic-button-large:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(197, 45, 22, 0.5);
}

.mic-button-large:active:not(:disabled),
.mic-button-large.active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

.mic-button-large .mic-icon {
    width: 60px;
    height: 60px;
    color: white;
}

.mic-button-large .mic-text {
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.mic-button-large:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mic-hint {
    font-size: 0.9em;
    color: #666;
    margin: 0;
    text-align: center;
}

/* ========== END CALL LINK ========== */
.end-call-link {
    background: none;
    border: none;
    color: #999;
    font-size: 0.9em;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.2s ease;
    text-decoration: underline;
}

.end-call-link:hover {
    color: #c52d16;
}

/* Mobile Optimizations for New Design */
@media (max-width: 768px) {
    .call-header-compact {
        font-size: 0.9em;
        padding: 10px 16px;
    }

    .chat-messages {
        padding: 16px;
        max-height: 350px;
        min-height: 200px;
    }

    .chat-message-content {
        font-size: 1em;
        padding: 12px 14px;
    }

    .mic-button-large {
        width: 140px;
        height: 140px;
    }

    .mic-button-large .mic-icon {
        width: 50px;
        height: 50px;
    }

    .mic-button-large .mic-text {
        font-size: 0.85em;
    }
}

/* Cooldown Section - Keep existing */
.cooldown-section {
    text-align: center;
    padding: 30px 20px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    margin: 20px 0;
}

.cooldown-section.hidden {
    display: none;
}

.cooldown-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.cooldown-icon {
    font-size: 3em;
}

.cooldown-message p {
    font-size: 1.1em;
    color: #856404;
    margin: 0;
}

.cooldown-message strong {
    font-size: 1.5em;
    color: #c52d16;
    font-weight: 600;
}

/* ============================================ */
/* ERROR MODAL STYLES - Microphone Permissions */
/* ============================================ */

.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.error-modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.error-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.error-modal-icon {
    font-size: 2em;
    line-height: 1;
}

.error-modal-header h2 {
    flex: 1;
    font-size: 1.3em;
    color: #231f20;
    margin: 0;
}

.error-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
}

.error-modal-close:hover {
    background: #e0e0e0;
    color: #231f20;
    transform: rotate(90deg);
}

.error-modal-body {
    padding: 24px;
}

.error-type {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #856404;
    word-break: break-word;
}

.error-type strong {
    color: #c52d16;
}

.error-instructions h3 {
    font-size: 1.1em;
    margin-bottom: 16px;
    color: #231f20;
}

.error-instructions ol {
    margin: 0;
    padding-left: 24px;
}

.error-instructions li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #495057;
}

.error-instructions li:last-child {
    margin-bottom: 0;
}

.error-modal-footer {
    padding: 20px 24px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.error-modal-footer .btn-primary {
    padding: 12px 24px;
    background: #c52d16;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.error-modal-footer .btn-primary:hover {
    background: #a52615;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 45, 22, 0.3);
}

.error-modal-footer .btn-primary:active {
    transform: translateY(0);
}

/* Mobile Optimizations for Error Modal */
@media (max-width: 768px) {
    .error-modal {
        max-width: 100%;
        margin: 0 10px;
        border-radius: 12px;
    }

    .error-modal-header {
        padding: 20px;
    }

    .error-modal-header h2 {
        font-size: 1.1em;
        padding-right: 40px; /* Make room for close button */
    }

    .error-modal-body {
        padding: 20px;
    }

    .error-instructions li {
        font-size: 0.95em;
        margin-bottom: 10px;
    }

    .error-modal-footer {
        padding: 16px 20px;
    }

    .error-modal-footer .btn-primary {
        width: 100%;
        padding: 14px;
    }
}
