/* ==========================================================================
   Obsadzovník Component Styling - Gymnázium Andreja Vrábla, Levice
   Optimized for Touch-Screen Kiosks / TV Mode
   Primary Accent Color: #3da870 and its relative tints
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --obs-green-primary: #3da870;
  --obs-green-hover: #328e5e;
  --obs-green-dark: #27724a;
  --obs-green-light: #eef8f2;
  --obs-green-border: #c3ebd5;
  --obs-green-badge: #d1fae5;
  --obs-green-text: #1d6e46;

  --obs-bg-main: #f8fafc;
  --obs-bg-card: #ffffff;
  --obs-bg-hover: #f1f5f9;
  --obs-bg-active: #e2e8f0;

  --obs-text-main: #0f172a;
  --obs-text-muted: #64748b;
  --obs-text-light: #94a3b8;

  --obs-border: #e2e8f0;
  --obs-border-focus: #3da870;

  --obs-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --obs-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --obs-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --obs-shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

  --obs-radius-sm: 6px;
  --obs-radius-md: 10px;
  --obs-radius-lg: 16px;
  --obs-radius-full: 9999px;

  --obs-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Modal Overlay Backdrop */
.obs-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.5vh 0.5vw;
  box-sizing: border-box;
  animation: obsFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.obs-modal-backdrop.active {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

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

@keyframes obsSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Multi-Card Floating Kiosk Workspace */
.obs-multi-workspace {
  width: 98vw;
  height: 94vh;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  font-family: var(--obs-font);
  color: var(--obs-text-main);
  animation: obsSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

/* Bottom Navigation Row: Box 1 (Days) & Box 2 (Views) side by side */
.obs-col-left {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  height: auto;
  flex-shrink: 0;
  order: 2;
}

/* Shared Floating Card Aesthetics (Surface Design Language) */
.obs-card-box {
  background-color: #ffffff;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: row;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

/* Box 1: Day Selector - horizontal row of day buttons */
.obs-card-day-picker {
  flex: 1;
  padding: 5px 14px;
}

/* Box 2: View Mode Selector - horizontal row of mode buttons */
.obs-card-view-selector {
  flex: none;
  width: auto;
  padding: 5px 14px;
}

/* Box 3: Main Schedule Window - full width, takes remaining height */
.obs-card-main-schedule {
  flex: 1;
  min-height: 0;
  order: 1;
  flex-direction: column;
  align-items: stretch;
}

/* Card Box Section Header - inline */
.obs-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
  border-bottom: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.obs-box-header-icon {
  width: 22px;
  height: 22px;
  color: #3da870;
  display: flex;
  align-items: center;
  justify-content: center;
}

.obs-box-header-icon svg {
  width: 100%;
  height: 100%;
}

.obs-box-header-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
}

/* Day Selector List - horizontal */
.obs-days-vertical-list {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex: 1;
  margin-top: 0;
  margin-left: 10px;
}

.obs-day-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1.5px solid var(--obs-border);
  background-color: #f8fafc;
  color: var(--obs-text-main);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  font-family: inherit;
  box-sizing: border-box;
  gap: 8px;
}

.obs-day-card-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateX(3px);
}

.obs-day-card-btn.active {
  background-color: #3da870;
  border-color: #3da870;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(61, 168, 112, 0.32);
}

.obs-day-card-btn.active:hover {
  background-color: #359864;
}

.obs-day-name {
  font-size: 15px;
  font-weight: 800;
}

.obs-day-badge-today {
  font-size: 11px;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: var(--obs-radius-full);
  letter-spacing: 0.5px;
}

.obs-day-card-btn.active .obs-day-badge-today {
  background-color: #ffffff;
  color: #15803d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.obs-day-card-btn:not(.active) .obs-day-badge-today {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.obs-view-vertical-list {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex: none;
  margin: 0;
}

.obs-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  flex: none;
  padding: 0 16px;
  border-radius: 14px;
  border: 1.5px solid var(--obs-border);
  background-color: #f8fafc;
  color: var(--obs-text-muted);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  font-family: inherit;
  box-sizing: border-box;
  text-align: left;
  white-space: nowrap;
}

.obs-tab-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--obs-text-main);
  transform: translateX(3px);
}

.obs-tab-btn.active {
  background-color: #3da870;
  border-color: #3da870;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(61, 168, 112, 0.32);
}

.obs-tab-btn.active:hover {
  background-color: #359864;
}

.obs-tab-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #64748b;
  transition: color 0.15s ease;
}

.obs-tab-btn.active .obs-tab-icon {
  color: #ffffff;
}

.obs-tab-btn svg {
  width: 100%;
  height: 100%;
}

/* Status Indicator Dot & Animation */
.obs-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--obs-green-primary);
  box-shadow: 0 0 0 3px rgba(61, 168, 112, 0.25);
  animation: obsPulse 2s infinite;
}

@keyframes obsPulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 168, 112, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(61, 168, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 168, 112, 0); }
}

/* Box 3 Header Bar */
.obs-main-box-header {
  background-color: #ffffff;
  padding: 14px 24px;
  border-bottom: 1px solid var(--obs-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.obs-main-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.obs-header-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.obs-header-title {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  color: var(--obs-text-main);
  letter-spacing: -0.4px;
  line-height: 1.15;
}

.obs-header-subtitle {
  font-size: 11.5px;
  color: var(--obs-text-muted);
  font-weight: 600;
  margin-top: 2px;
}

.obs-main-header-center {
  display: flex;
  align-items: center;
}

.obs-header-status-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f8fafc;
  border: 1px solid var(--obs-border);
  padding: 7px 18px;
  border-radius: var(--obs-radius-full);
  font-size: 15.5px;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
}

.obs-header-status-badge b {
  color: var(--obs-green-dark);
  font-weight: 900;
}

.obs-main-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.obs-inactivity-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid var(--obs-border);
  padding: 8px 14px;
  border-radius: var(--obs-radius-full);
  font-size: 13px;
  color: var(--obs-text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.obs-inactivity-pill b {
  color: #3da870;
  font-weight: 800;
}

.obs-card-close-wrapper {
  margin-left: auto;
  padding: 0;
  flex: none;
}

.obs-close-btn {
  border: 1.5px solid #fca5a5;
  background-color: #fee2e2;
  color: #dc2626;
  font-size: 16px;
  font-weight: 800;
  padding: 0 38px;
  height: 54px;
  border-radius: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  font-family: inherit;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.2);
}

.obs-close-btn svg {
  width: 22px;
  height: 22px;
}

.obs-close-btn:hover {
  background-color: #fecaca;
  border-color: #f87171;
  transform: translateX(3px);
  color: #b91c1c;
}

.obs-close-btn:active {
  background-color: #fca5a5;
  transform: scale(0.97);
}

/* Embedded Search Bar in Box 3 */
.obs-main-search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--obs-border);
  flex-shrink: 0;
}

.obs-search-wrapper {
  position: relative;
  width: 440px;
}

.obs-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--obs-text-light);
  pointer-events: none;
}

.obs-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 14px 9px 40px;
  border-radius: var(--obs-radius-full);
  border: 1px solid var(--obs-border);
  background-color: #ffffff;
  font-size: 14px;
  color: var(--obs-text-main);
  outline: none;
  transition: all 0.18s ease;
  font-family: inherit;
}

.obs-search-input:focus {
  border-color: #3da870;
  box-shadow: 0 0 0 3px rgba(61, 168, 112, 0.18);
}

.obs-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--obs-text-light);
  cursor: pointer;
  font-size: 17px;
  padding: 2px 6px;
  display: none;
}

.obs-search-clear.visible {
  display: block;
}

.obs-main-hint-text {
  font-size: 12px;
  color: var(--obs-text-muted);
  font-weight: 600;
}

/* Modal Body Content Area */
.obs-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  position: relative;
  background-color: var(--obs-bg-main);
  width: 100%;
}

/* Ensure all views stretch to fill the body */
.obs-body > * {
  width: 100% !important;
  max-width: none !important;
}

/* ==========================================================================
   VIEW 1: CLASSROOMS VIEW (Podľa učební - Space-Efficient & Compact)
   ========================================================================== */
.obs-view-classrooms {
  width: 100% !important;
  height: 100%;
  display: flex;
  overflow: hidden;
}

.obs-sidebar-rooms {
  width: 260px;
  min-width: 220px;
  background-color: #ffffff;
  border-right: 1px solid var(--obs-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.obs-sidebar-title {
  padding: 10px 14px 6px 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--obs-text-muted);
}

.obs-rooms-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}

.obs-room-chip-btn {
  border: 1px solid var(--obs-border);
  background-color: #ffffff;
  border-radius: var(--obs-radius-md);
  padding: 9px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  font-family: inherit;
  white-space: nowrap;
}

.obs-room-chip-btn:active {
  transform: scale(0.98);
}

.obs-room-chip-btn.active {
  background-color: var(--obs-green-light);
  border-color: var(--obs-green-primary);
  box-shadow: 0 2px 6px rgba(61, 168, 112, 0.18);
}

.obs-room-chip-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--obs-text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.obs-room-chip-name svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--obs-green-primary);
}

.obs-room-chip-badge {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: var(--obs-radius-full);
  background-color: #f1f5f9;
  color: var(--obs-text-muted);
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}
  background-color: #f1f5f9;
  color: var(--obs-text-muted);
  font-weight: 700;
}

.obs-room-chip-btn.active .obs-room-chip-badge {
  background-color: var(--obs-green-badge);
  color: var(--obs-green-text);
}

/* Detail Timeline Area for Selected Classroom: Fills vertical space cleanly */
.obs-room-detail-pane {
  flex: 1;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.obs-room-hero-card {
  background-color: #ffffff;
  border-radius: var(--obs-radius-md);
  padding: 12px 20px;
  border: 1px solid var(--obs-border);
  box-shadow: var(--obs-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.obs-room-hero-title {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.obs-room-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.obs-room-hero-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--obs-radius-sm);
  background-color: var(--obs-green-light);
  color: var(--obs-green-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.obs-room-hero-icon svg {
  width: 24px;
  height: 24px;
}

.obs-room-hero-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--obs-text-main);
  margin: 0;
  letter-spacing: -0.2px;
  text-align: left;
}

.obs-room-hero-desc {
  font-size: 15px;
  font-weight: 500;
  color: var(--obs-text-muted);
  margin-top: 3px;
  text-align: left;
}

.obs-room-hero-desc b {
  font-weight: 800;
  color: var(--obs-text-main);
}

.obs-hero-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--obs-green-light);
  border: 1px solid var(--obs-green-border);
  padding: 8px 18px;
  border-radius: var(--obs-radius-full);
  font-size: 15px;
  font-weight: 800;
  color: var(--obs-green-text);
  white-space: nowrap;
}

.obs-hero-status-pill svg {
  width: 20px;
  height: 20px;
  color: var(--obs-green-primary);
  flex-shrink: 0;
}

/* 4-Column x 2-Row Timeline Grid: Both rows 1 and 2 have the EXACT same height */
.obs-periods-timeline {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, calc((100% - 30px) / 4));
  grid-template-rows: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 10px;
  width: 100%;
}

@media (max-width: 1300px) {
  .obs-periods-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, 1fr);
  }
}

@media (max-width: 800px) {
  .obs-periods-timeline {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, 1fr);
  }
}

.obs-period-card {
  background-color: #ffffff;
  border: 1px solid var(--obs-border);
  border-radius: var(--obs-radius-md);
  padding: 10px 14px;
  transition: all 0.18s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  box-shadow: var(--obs-shadow-sm);
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.obs-period-card.current {
  border-color: var(--obs-green-primary);
  background-color: #f0fdf4;
  box-shadow: 0 0 0 2px var(--obs-green-primary), var(--obs-shadow-sm);
}

.obs-period-card.occupied {
  border-left: 5px solid var(--obs-green-primary);
}

.obs-period-card.free {
  border-left: 5px solid #cbd5e1;
  opacity: 0.85;
  background-color: #fafbfc;
}

.obs-period-free-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #b0bec5;
  font-weight: 800;
  font-size: 16px;
  padding: 4px 4px;
  min-height: 0;
  overflow: hidden;
}

.obs-period-free-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  color: #9fb5be;
  flex-shrink: 0;
  opacity: 0.8;
}

.obs-period-free-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke-width: 4;
}

.obs-period-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
}

.obs-period-time-badge {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  flex-wrap: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.obs-period-time-badge svg {
  width: 20px;
  height: 20px;
  color: var(--obs-green-primary);
  align-self: center;
  flex-shrink: 0;
}

.obs-period-num-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--obs-text-main);
  white-space: nowrap;
}

.obs-period-time-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--obs-text-muted);
  white-space: nowrap;
}

.obs-period-now-tag {
  background-color: var(--obs-green-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: var(--obs-radius-full);
  animation: obsPulse 2s infinite;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Teacher card in classroom view */
.obs-teacher-badge-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #f8fafc;
  border: 1px solid var(--obs-border);
  padding: 10px 14px;
  border-radius: var(--obs-radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  flex: 1;
  min-height: 0;
}

/* Inside period cards: center layout with icon above name */
.obs-period-card .obs-teacher-badge-link {
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 12px;
}

.obs-teacher-badge-link .obs-period-now-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
}

.obs-teacher-badge-center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0px;
  width: 100%;
}

.obs-period-card .obs-teacher-small-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  max-height: 35%;
  color: var(--obs-green-primary);
  opacity: 0.9;
  flex-shrink: 1;
}

.obs-period-card .obs-teacher-small-icon svg {
  width: 24px;
  height: 24px;
  max-width: 100%;
  max-height: 100%;
  stroke-width: 2.2;
}

.obs-period-card .obs-teacher-name-full {
  text-align: center;
  font-size: 16px;
}

.obs-period-card .obs-teacher-code-pill {
  font-size: 13px;
  padding: 2px 8px;
  margin-top: 4px;
}

.obs-teacher-badge-link:hover,
.obs-teacher-badge-link:active {
  background-color: var(--obs-green-light);
  border-color: var(--obs-green-border);
  transform: translateY(-1px);
}

.obs-teacher-small-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--obs-green-primary);
  flex-shrink: 0;
}

.obs-teacher-small-icon svg {
  width: 18px;
  height: 18px;
}

.obs-teacher-name-full {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--obs-text-main);
  flex: 1;
  line-height: 1.3;
  word-break: normal;
  white-space: normal;
}

.obs-teacher-code-pill {
  font-size: 12px;
  font-weight: 800;
  background-color: #e2e8f0;
  color: #475569;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.obs-teacher-badge-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.obs-teacher-badge-arrow svg {
  width: 24px;
  height: 24px;
  color: var(--obs-green-primary);
  stroke-width: 2.5;
  transition: transform 0.15s ease;
}

.obs-teacher-badge-link:hover .obs-teacher-badge-arrow svg {
  transform: translateX(4px);
}

/* Trieda: SAJ4 text box / blob: spans full card width cleanly */
.obs-subject-detail-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--obs-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f1f5f9;
  border: 1px solid var(--obs-border);
  padding: 6px 12px;
  border-radius: var(--obs-radius-md);
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

.obs-period-card .obs-subject-detail-tag b {
  font-size: 20px;
}

.obs-subject-detail-tag span {
  flex-shrink: 0;
}

.obs-subject-detail-tag b {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--obs-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
}

/* ==========================================================================
   VIEW 2: TEACHERS ROUTE VIEW (Sorted by Abbreviations & Side-by-side Time)
   ========================================================================== */
.obs-view-teachers {
  width: 100% !important;
  height: 100%;
  display: flex;
  overflow: hidden;
}

.obs-sidebar-teachers {
  width: 400px;
  min-width: 360px;
  background-color: #ffffff;
  border-right: 1px solid var(--obs-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.obs-teachers-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}

.obs-teacher-chip-btn {
  border: 1px solid var(--obs-border);
  background-color: #ffffff;
  border-radius: var(--obs-radius-md);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  font-family: inherit;
}

.obs-teacher-chip-btn:active {
  transform: scale(0.98);
}

.obs-teacher-chip-btn.active {
  background-color: var(--obs-green-light);
  border-color: var(--obs-green-primary);
  box-shadow: 0 2px 6px rgba(61, 168, 112, 0.18);
}

.obs-teacher-chip-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--obs-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Teacher Route Detail Pane: Fills height to bottom */
.obs-teacher-detail-pane {
  flex: 1;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 12px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.obs-route-timeline {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: space-between;
  width: 100%;
}

.obs-route-step-card {
  flex: 1;
  min-height: 0;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--obs-border);
  border-radius: var(--obs-radius-md);
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) minmax(100px, 1fr) minmax(100px, 1fr) minmax(140px, 1.2fr);
  align-items: center;
  gap: 20px;
  transition: all 0.18s ease;
  box-shadow: var(--obs-shadow-sm);
  box-sizing: border-box;
}

.obs-route-step-card.teaching {
  border-left: 5px solid var(--obs-green-primary);
}

.obs-route-step-card.free {
  border-left: 5px solid #cbd5e1;
  background-color: #fafbfc;
  opacity: 0.8;
  grid-template-columns: minmax(180px, 1.2fr) 1fr;
}

.obs-route-step-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Period Number & Time Side-by-Side */
.obs-route-period-box {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.obs-route-period-num {
  font-size: 19px;
  font-weight: 900;
  color: var(--obs-text-main);
  white-space: nowrap;
}

.obs-route-period-time {
  font-size: 14px;
  font-weight: 700;
  color: var(--obs-text-muted);
  background-color: #f1f5f9;
  padding: 4px 12px;
  border-radius: var(--obs-radius-full);
  white-space: nowrap;
}

/* Middle Class & Room blobs: each in its own grid cell */
.obs-route-step-middle {
  display: contents;
}

.obs-route-step-middle .obs-subject-detail-tag {
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  padding: 0 16px;
  border-radius: var(--obs-radius-md);
  background-color: #f1f5f9;
  border: 1px solid var(--obs-border);
  color: var(--obs-text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.obs-route-step-middle .obs-subject-detail-tag span {
  flex-shrink: 0;
}

.obs-route-step-middle .obs-subject-detail-tag b {
  font-size: 15.5px;
  font-weight: 900;
  color: var(--obs-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Classroom Jump Button: fills its grid cell */
.obs-room-jump-btn {
  background-color: var(--obs-green-primary);
  border: 1px solid var(--obs-green-hover);
  color: #ffffff;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  padding: 0 16px;
  border-radius: var(--obs-radius-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(61, 168, 112, 0.28);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
  font-family: inherit;
  white-space: nowrap;
  transform: none !important;
}

.obs-room-jump-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.obs-room-jump-btn:hover {
  background-color: var(--obs-green-hover);
  transform: none !important;
}

.obs-room-jump-btn:active {
  background-color: var(--obs-green-dark);
  transform: none !important;
}

.obs-route-free-label {
  color: #94a3b8;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
  text-align: right;
}

/* ==========================================================================
   VIEW 3: GRID MATRIX VIEW (Mriežka)
   ========================================================================== */
.obs-view-grid {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  box-sizing: border-box;
  overflow: hidden;
}

.obs-grid-table-container {
  flex: 1;
  background-color: #ffffff;
  border-radius: var(--obs-radius-md);
  border: 1px solid var(--obs-border);
  box-shadow: var(--obs-shadow-sm);
  overflow: auto;
  min-height: 0;
}

.obs-grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

.obs-grid-table th,
.obs-grid-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--obs-border);
  border-right: 1px solid var(--obs-border);
  text-align: left;
}

.obs-grid-table th {
  background-color: #f8fafc;
  color: var(--obs-text-muted);
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 5;
}

.obs-grid-table th.obs-sticky-col,
.obs-grid-table td.obs-sticky-col {
  position: sticky;
  left: 0;
  z-index: 6;
  background-color: #ffffff;
  font-weight: 800;
  color: var(--obs-text-main);
  border-right: 2px solid var(--obs-border);
}

.obs-grid-table th.obs-sticky-col {
  z-index: 7;
  background-color: #f1f5f9;
}

.obs-grid-cell {
  min-width: 135px;
  max-width: 180px;
  height: 52px;
  vertical-align: top;
  cursor: pointer;
  transition: background-color 0.15s ease;
  user-select: none;
}

.obs-grid-cell:active {
  background-color: var(--obs-green-light);
}

.obs-grid-cell.occupied {
  background-color: #ffffff;
}

.obs-grid-cell.occupied:hover {
  background-color: #f0fdf4;
}

.obs-grid-cell.free {
  background-color: #fafafa;
  color: #94a3b8;
}

.obs-cell-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  align-items: flex-start;
}

.obs-cell-teacher-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--obs-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  width: 100%;
}

.obs-cell-details-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--obs-green-text);
  background-color: var(--obs-green-light);
  padding: 1px 5px;
  border-radius: 4px;
  width: fit-content;
}


/* Touch screen scrollbar elegance */
.obs-modal-container *::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.obs-modal-container *::-webkit-scrollbar-track {
  background: transparent;
}

.obs-modal-container *::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.obs-modal-container *::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
