/* BrainSAIT Voice-Linc Stylesheet
 * Arabic RTL Interface for Healthcare Voice Communication
 */

/* CSS Variables for Healthcare Theme */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    /* Healthcare-specific colors */
    --healthcare-blue: #1e40af;
    --medical-green: #059669;
    --nursing-purple: #7c3aed;
    --support-orange: #ea580c;

    /* Background and text colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* Arabic RTL adjustments */
    --border-radius: 12px;
    --shadow-soft: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Font stack */
    --font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

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

html {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
}

body {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--healthcare-blue) 0%, var(--medical-green) 100%);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: white;
}

.logo h1 {
    color: white;
    font-size: 1.75rem;
    font-weight: 600;
}

.logo .subtitle {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 0.25rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #10b981;
}

.status-text {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Voice Interface Section */
.voice-interface {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    border-right: 4px solid var(--healthcare-blue);
}

.voice-controls {
    display: grid;
    gap: 2rem;
}

/* Profile Selector */
.profile-selector h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.profile-btn {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.profile-btn.active {
    border-color: var(--healthcare-blue);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
}

.profile-btn i {
    font-size: 2rem;
    color: var(--healthcare-blue);
    margin-bottom: 0.25rem;
}

.profile-btn[data-profile="patient_care"] i { color: var(--nursing-purple); }
.profile-btn[data-profile="medical_consultation"] i { color: var(--healthcare-blue); }
.profile-btn[data-profile="appointment_scheduling"] i { color: var(--secondary-color); }
.profile-btn[data-profile="emotional_support"] i { color: var(--support-orange); }

.profile-btn.active i {
    transform: scale(1.1);
}

.profile-btn span {
    font-weight: 600;
    color: var(--text-primary);
}

.profile-btn small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Text Input Section */
.text-input-section {
    display: grid;
    gap: 1.5rem;
}

.input-group {
    display: grid;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    resize: vertical;
    transition: border-color var(--transition-fast);
    background: var(--bg-secondary);
}

.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.char-counter {
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Control Buttons */
.control-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--bg-tertiary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-small {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--bg-tertiary);
    padding: 0.5rem 1rem;
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-small:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Audio Player */
.audio-player {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 4px solid var(--success-color);
}

.audio-player h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audio-player audio {
    width: 100%;
    margin-bottom: 1rem;
}

.audio-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

/* Healthcare Conversations Section */
.healthcare-conversations,
.staff-mentoring {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
}

.healthcare-conversations {
    border-right: 4px solid var(--medical-green);
}

.staff-mentoring {
    border-right: 4px solid var(--nursing-purple);
}

.conversations-header,
.mentoring-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.conversations-header h3,
.mentoring-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conversation-input,
.mentoring-input {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.conversation-input textarea,
.mentoring-input textarea {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--border-radius);
    resize: vertical;
}

.conversation-input textarea:focus,
.mentoring-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.conversation-response,
.mentoring-response {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.response-label {
    font-weight: 600;
    color: var(--text-primary);
}

.response-context,
.mentoring-type {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--border-radius) / 2);
}

.response-audio,
.audio-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.response-audio audio {
    flex: 1;
}

/* Staff Level Selector */
#staff-level {
    padding: 0.5rem;
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

#staff-level:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Status Bar */
.status-bar {
    background: var(--bg-primary);
    border-top: 1px solid var(--bg-tertiary);
    padding: 1rem 2rem;
    margin-top: 2rem;
}

.status-info {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.loading-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-large);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

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

/* Coming Soon Badge */
.coming-soon {
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .main-container {
        padding: 1rem;
    }

    .container {
        grid-template-columns: 1fr;
    }

    .profile-buttons {
        grid-template-columns: 1fr;
    }

    .control-buttons {
        flex-direction: column;
    }

    .conversations-header,
    .mentoring-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .conversation-input,
    .mentoring-input {
        flex-direction: column;
    }

    .response-audio,
    .audio-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .status-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .voice-interface,
    .healthcare-conversations,
    .staff-mentoring {
        padding: 1rem;
    }

    .logo {
        flex-direction: column;
        text-align: center;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }
}

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

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-small {
        border-width: 3px;
    }

    .profile-btn {
        border-width: 3px;
    }
}</content>
