html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}
#map {
    height: 400px;
}

.custom-clinic-modal {
    max-width: 900px !important;
    height: auto;
}

    .custom-clinic-modal .modal-content {
        min-height: 90vh;
        overflow-y: auto;
    }

   

:root {
    --primary: #0ea5a5;
    --primary-hover: #0c8a8a;
    --secondary: #f0f4f8;
    --secondary-dark: #e1e8ef;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #888;
    --danger: #e53e3e;
    --success: #38a169;
    --warning: #dd6b20;
    --border: #e2e8f0;
    --radius: 0.5rem;
}
.form-floating > .form-control, .form-floating > .form-control-plaintext, .form-floating > .form-select {
    height: calc(4.75rem + 2px);
    line-height: 1.25;
}
body {
    font-family: "Tajawal", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

    /* Support for both RTL and LTR */
    body[dir="rtl"] .rtl-flip {
        transform: scaleX(-1);
    }

    body[dir="ltr"] .rtl-element {
        text-align: left;
    }

    body[dir="rtl"] .rtl-element {
        text-align: right;
    }

    body[dir="ltr"] .rtl-margin {
        margin-right: 0;
        margin-left: 0.5rem;
    }

    body[dir="rtl"] .rtl-margin {
        margin-left: 0;
        margin-right: 0.5rem;
    }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.room-code {
    display: inline-flex;
    align-items: center;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.room-code-copy {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
}

body[dir="rtl"] .room-code-copy {
    margin-right: 0.5rem;
}

body[dir="ltr"] .room-code-copy {
    margin-left: 0.5rem;
}

.room-code-copy:hover {
    color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
}

    .btn-primary:hover {
        background-color: var(--primary-hover);
    }

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

    .btn-outline:hover {
        background-color: var(--secondary);
    }

.btn-danger {
    background-color: var(--danger);
    color: white;
    border: none;
}

    .btn-danger:hover {
        background-color: #c53030;
    }

.btn-success {
    background-color: var(--success);
    color: white;
    border: none;
}

    .btn-success:hover {
        background-color: #2f855a;
    }

.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.video-container {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background-color: #1a202c;
    aspect-ratio: 16 / 9;
}

    .video-container.local {
        border: 2px solid var(--primary);
    }

    .video-container.remote {
        border: 2px solid var(--border);
    }

    .video-container.distracted {
        border: 2px solid var(--danger);
    }

    .video-container video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.video-overlay {
    position: absolute;
    bottom: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}
.menu-link.active {
    background-color: #f0f0f0;
    color: #000;
    font-weight: bold;
}

body[dir="rtl"] .video-overlay {
    left: 0.5rem;
}

body[dir="ltr"] .video-overlay {
    right: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

body[dir="rtl"] .badge {
    margin-right: 0.5rem;
}

body[dir="ltr"] .badge {
    margin-left: 0.5rem;
}

.badge-outline {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-danger {
    background-color: var(--danger);
    color: white;
}

.badge-success {
    background-color: var(--success);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: white;
}

.distracted-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(229, 62, 62, 0.2);
}

.distracted-icon {
    color: var(--danger);
    width: 3rem;
    height: 3rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.7;
    }

    70% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.7;
    }
}

.controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tab {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
}

    .tab.active {
        background-color: white;
        border-color: var(--primary);
        color: var(--primary);
    }

.tab-content {
    display: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: white;
    padding: 1rem;
    height: 400px;
    overflow-y: auto;
}

    .tab-content.active {
        display: block;
    }

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
}

.input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
}

.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.25rem;
}

.message-sender {
    font-weight: 500;
}

body[dir="rtl"] .message-sender {
    margin-left: 0.5rem;
}

body[dir="ltr"] .message-sender {
    margin-right: 0.5rem;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message-text {
    font-size: 0.875rem;
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.participant {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: var(--radius);
    background-color: var(--secondary);
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.participant-details {
    display: flex;
    flex-direction: column;
}

.participant-name {
    font-weight: 500;
}

.participant-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.participant-engagement {
    display: flex;
    align-items: center;
}



.ai-monitor {
    margin-top: 1rem;
    border: 2px dashed var(--primary);
    border-radius: var(--radius);
}

.ai-monitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.ai-monitor-title {
    font-size: 1.125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

body[dir="rtl"] .ai-monitor-title i {
    margin-left: 0.5rem;
}

body[dir="ltr"] .ai-monitor-title i {
    margin-right: 0.5rem;
}

.ai-monitor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .ai-monitor-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ai-monitor-card {
    background-color: var(--secondary);
    border-radius: var(--radius);
    padding: 0.75rem;
}

.ai-monitor-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.ai-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.engagement-meter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--secondary);
    padding: 0.5rem;
    border-radius: var(--radius);
}

.engagement-progress {
    width: 8rem;
}

.progress-container {
    width: 100%;
    height: 0.5rem;
    background-color: var(--border);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

    .progress-bar.warning {
        background-color: var(--warning);
    }

    .progress-bar.danger {
        background-color: var(--danger);
    }

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--danger);
    font-size: 0.875rem;
}

.separator {
    height: 1px;
    background-color: var(--border);
    margin: 1rem 0;
}

.development-badge {
    background-color: #fff8e1;
    color: #b45309;
    border: 1px solid #fef3c7;
}

/* Language switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.language-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .language-btn:hover,
    .language-btn.active {
        background-color: var(--primary);
        color: white;
        border-color: var(--primary);
    }
