
/* Fullscreen TV Display - only for TV pages */
.tv-display-page {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.tv-display-page html, 
.tv-display-page body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Theme Variables */
/* Centered Call Display */
.centered-call-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Dark theme styles */
[data-bs-theme="dark"] .centered-call-display {
    background-color: rgba(0, 0, 0, 0.9);
}

[data-bs-theme="dark"] .centered-call-content {
    color: var(--bs-light);
}

[data-bs-theme="dark"] .centered-call-content .room-number {
    color: var(--bs-blue);
}

/* Light theme styles */
[data-bs-theme="light"] .centered-call-display {
    background-color: rgba(255, 255, 255, 0.95);
}

[data-bs-theme="light"] .centered-call-content {
    color: var(--bs-blue);
}

[data-bs-theme="light"] .centered-call-content .room-number {
    color: var(--bs-dark);
}

.centered-call-display.active {
    opacity: 1;
}

.centered-call-content {
    text-align: center;
    padding: 2rem;
}

.centered-call-content .patient-name {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.centered-call-content .room-number {
    font-size: 4rem;
}

:root[data-bs-theme=light] {
    --custom-bg: var(--bs-white);
    --custom-text: var(--bs-dark);
    --custom-border: var(--bs-gray-200);
    --custom-highlight: var(--bs-primary);
    --custom-card-bg: var(--bs-white);
    --custom-input-bg: var(--bs-white);
    --custom-display-bg: var(--bs-white);
    --custom-call-item-bg: var(--bs-white);
    --custom-call-text: var(--bs-dark);
    --custom-time-text: var(--bs-gray-600);
    --bs-body-color: var(--bs-dark);
    --bs-heading-color: var(--bs-dark);
}

/* File input styles for light theme */
:root[data-bs-theme=light] .form-control[type="file"]::file-selector-button {
    color: var(--bs-white);
}

/* Table styles for light theme */
:root[data-bs-theme=light] .table {
    --bs-table-bg: var(--bs-white);
    --bs-table-color: var(--bs-dark);
    --bs-table-border-color: var(--bs-gray-300);
    background-color: var(--bs-white) !important;
}

:root[data-bs-theme=light] .table thead,
:root[data-bs-theme=light] .table tbody,
:root[data-bs-theme=light] .table td,
:root[data-bs-theme=light] .table th,
:root[data-bs-theme=light] .table tr {
    background-color: var(--bs-white) !important;
    color: var(--bs-dark) !important;
}

:root[data-bs-theme=light] .table tbody tr:hover {
    background-color: var(--bs-gray-100) !important;
}

:root[data-bs-theme=light] .card {
    background-color: var(--bs-white);
}

/* Button styles for light theme */
:root[data-bs-theme=light] .btn-primary {
    --bs-btn-bg: var(--bs-blue);
    --bs-btn-border-color: var(--bs-blue);
    --bs-btn-hover-bg: var(--bs-white);
    --bs-btn-hover-border-color: var(--bs-blue);
    --bs-btn-color: var(--bs-white);
    --bs-btn-hover-color: var(--bs-dark);
}

:root[data-bs-theme=light] .btn-secondary {
    --bs-btn-bg: var(--bs-info);
    --bs-btn-border-color: var(--bs-info);
    --bs-btn-hover-bg: var(--bs-white);
    --bs-btn-hover-border-color: var(--bs-info);
    --bs-btn-color: var(--bs-white);
    --bs-btn-hover-color: var(--bs-dark);
}

/* Volume control for light theme */
:root[data-bs-theme=light] .form-range::-webkit-slider-thumb {
    background-color: var(--bs-blue);
}

:root[data-bs-theme=light] .form-range::-webkit-slider-runnable-track {
    background-color: var(--bs-gray-300);
}

:root[data-bs-theme=dark] {
    --custom-bg: var(--bs-dark);
    --custom-text: var(--bs-light);
    --custom-border: var(--bs-gray-700);
    --custom-highlight: var(--bs-info);
    --custom-card-bg: var(--bs-dark);
    --custom-input-bg: var(--bs-dark);
    --custom-display-bg: var(--bs-dark);
    --custom-call-item-bg: rgba(0, 0, 0, 0.3);
    --custom-call-text: var(--bs-white);
    --custom-time-text: var(--bs-gray-400);
}

/* Button styles for dark theme */
:root[data-bs-theme=dark] .btn-primary {
    --bs-btn-bg: var(--bs-blue);
    --bs-btn-border-color: var(--bs-blue);
    --bs-btn-hover-bg: var(--bs-blue-600);
    --bs-btn-hover-border-color: var(--bs-blue-600);
    --bs-btn-color: var(--bs-white);
}

:root[data-bs-theme=dark] .btn-secondary {
    --bs-btn-bg: var(--bs-info);
    --bs-btn-border-color: var(--bs-info);
    --bs-btn-hover-bg: var(--bs-info-600);
    --bs-btn-hover-border-color: var(--bs-info-600);
    --bs-btn-color: var(--bs-white);
}

/* Volume control for dark theme */
:root[data-bs-theme=dark] .form-range::-webkit-slider-thumb {
    background-color: var(--bs-blue);
}

:root[data-bs-theme=dark] .form-range::-webkit-slider-runnable-track {
    background-color: var(--bs-gray-700);
}

body {
    background-color: var(--custom-bg);
    color: var(--custom-text);
}

.card {
    background-color: var(--custom-card-bg);
    border-color: var(--custom-border);
}

.card-title, .form-label {
    color: var(--custom-text);
}

#displayName, #displayRoom {
    color: var(--custom-text);
}

.display-panel {
    background-color: var(--custom-display-bg);
    border-radius: 8px;
    min-height: 300px;
}

.current-patient {
    padding: 2rem;
    border: 2px solid var(--bs-blue);
    border-radius: 8px;
}

#displayName {
    margin: 1rem 0;
    color: var(--bs-blue);
}

#displayRoom {
    margin: 1rem 0;
    color: var(--bs-blue);
}

.form-control, .form-select {
    background-color: var(--custom-input-bg);
    border-color: var(--custom-border);
    color: var(--custom-text);
}

.form-control:focus, .form-select:focus {
    background-color: var(--custom-input-bg);
    border-color: var(--custom-highlight);
    color: var(--custom-text);
}

/* Current Patient Display Styles */
.current-patient {
    padding: 1rem;
    margin-bottom: 1.5rem;
}

#displayName {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

#displayRoom {
    font-size: 2rem;
    color: var(--bs-info);
    margin-bottom: 0.25rem;
}

.current-patient h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Call History Styles */
.call-history {
    background-color: transparent;
    border-radius: 8px;
    padding: 1rem;
}

.call-history-item {
    background-color: var(--custom-call-item-bg);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.call-history-item.new {
    border-color: var(--bs-blue);
    background-color: rgba(var(--bs-blue-rgb), 0.1);
}

.call-history-patient {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--custom-call-text);
    margin-bottom: 0.25rem;
}

.call-history-room {
    font-size: 1.1rem;
    color: var(--bs-blue);
    margin-bottom: 0.25rem;
}

.call-history-time {
    color: var(--custom-time-text);
    font-size: 0.9rem;
}

/* TV Display Styles */
.tv-display {
    background-color: var(--custom-bg);
    height: 100vh;
    overflow: hidden;
    color: var(--custom-text);
}

.tv-container {
    height: 100vh;
    padding: 3rem;
}

.tv-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

.calls-only-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
}

.calls-section {
    background-color: transparent;
    padding: 1rem;
    border-radius: 1rem;
    border: 2px solid var(--bs-blue);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    height: 100vh;
    width: 100vw;
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 1rem;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

/* Current Call Container (Left - 70%) */
.current-call-container {
    background-color: rgba(var(--bs-blue-rgb), 0.05);
    border: 2px solid var(--bs-blue);
    border-radius: 1.2rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.current-call-title {
    font-size: 2.5rem;
    color: var(--bs-blue);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.current-call-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.no-current-call {
    font-size: 1.8rem;
    color: var(--custom-text);
    opacity: 0.6;
    text-align: center;
    font-style: italic;
}

/* Recent Calls Container (Right - 30%) */
.recent-calls-container {
    background-color: rgba(var(--bs-blue-rgb), 0.02);
    border: 2px solid rgba(var(--bs-blue-rgb), 0.3);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.recent-calls-title {
    font-size: 2.5rem;
    color: var(--bs-blue);
    margin-bottom: 0.8rem;
    text-align: center;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Full-width containers for when advertising is disabled (70/30 split) */
.current-call-container-fullwidth {
    background-color: rgba(var(--bs-blue-rgb), 0.05);
    border: 2px solid var(--bs-blue);
    border-radius: 1.2rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.recent-calls-container-fullwidth {
    background-color: rgba(var(--bs-blue-rgb), 0.02);
    border: 2px solid rgba(var(--bs-blue-rgb), 0.3);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.calls-section-fullwidth {
    background-color: transparent;
    padding: 1rem;
    border-radius: 1rem;
    border: 2px solid var(--bs-blue);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    height: 100vh;
    width: 100vw;
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 1rem;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.calls-section h2, .calls-section-fullwidth h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--bs-blue);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.calls-section-fullwidth h2 {
    font-size: 4.5rem;
    margin-bottom: 3rem;
}

.recent-calls {
    font-size: 1rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding-right: 0.3rem;
}

/* Current call item styling (70% container) */
.current-call-item {
    text-align: center;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.current-call-patient {
    font-size: 7rem;
    font-weight: 800;
    color: var(--custom-call-text);
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    line-height: 1.1;
}

.current-call-room {
    font-size: 2.8rem;
    color: var(--bs-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.current-call-time {
    font-size: 2rem;
    color: var(--custom-time-text);
    opacity: 0.8;
    line-height: 1.1;
}

/* Custom scrollbar for recent calls */
.recent-calls::-webkit-scrollbar {
    width: 8px;
}

.recent-calls::-webkit-scrollbar-track {
    background: rgba(var(--bs-blue-rgb), 0.1);
    border-radius: 4px;
}

.recent-calls::-webkit-scrollbar-thumb {
    background: var(--bs-blue);
    border-radius: 4px;
}

.recent-calls::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--bs-blue-rgb), 0.8);
}

.call-item {
    background-color: var(--custom-call-item-bg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 1rem;
    border: 2px solid var(--custom-border);
    transition: all 0.5s ease;
    opacity: 0.6;
    transform: scale(0.8);
    flex-shrink: 0;
}

/* Recent calls styling (30% container - smaller fonts) */
.recent-calls .call-item {
    opacity: 0.9;
    border-width: 1px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    background-color: rgba(var(--bs-blue-rgb), 0.03);
    border: 1px solid rgba(var(--bs-blue-rgb), 0.2);
}

.recent-calls .call-item:nth-child(1) {
    opacity: 1;
    border-width: 1px;
    border-color: rgba(var(--bs-blue-rgb), 0.4);
    background-color: rgba(var(--bs-blue-rgb), 0.06);
}

.recent-calls .call-item:nth-child(2) {
    opacity: 0.8;
}

.recent-calls .call-item:nth-child(3) {
    opacity: 0.7;
}

.call-item.new {
    border-color: var(--bs-blue);
    background-color: rgba(var(--bs-blue-rgb), 0.2);
    animation: highlight 2s ease-out;
}

/* Patient name sizes for recent calls (30% container) */
.recent-calls .call-item .call-patient {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--custom-call-text);
    margin-bottom: 0.1rem;
    line-height: 1.2;
    text-align: center;
}

.recent-calls .call-item:nth-child(1) .call-patient {
    font-size: 2rem;
    font-weight: 700;
}

/* Room number and time sizes for recent calls (30% container) */
.recent-calls .call-item .call-room {
    font-size: 1.4rem;
    color: var(--bs-blue);
    margin-bottom: 0.1rem;
    line-height: 1.2;
    text-align: center;
}

.recent-calls .call-item:nth-child(1) .call-room {
    font-size: 1.6rem;
}

.recent-calls .call-item .call-time {
    color: var(--custom-time-text);
    font-size: 1.2rem;
    line-height: 1.2;
    text-align: center;
    opacity: 0.8;
}

.recent-calls .call-item:nth-child(1) .call-time {
    font-size: 1.3rem;
}

.video-section {
    border-radius: 1.5rem;
    overflow: hidden;
    background-color: var(--bs-dark);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

@keyframes highlight {
    0% { background-color: var(--bs-blue); }
    100% { background-color: transparent; }
}

/* Theme toggle button styles for TV display */
.tv-display .btn[onclick="toggleTheme()"] {
    transform: scale(0.3);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.tv-display .btn[onclick="toggleTheme()"]:hover {
    opacity: 1;
}
