/* TYBSc IT Timetable - Airbnb Design System (airbnb/DESIGN.md) */

:root {
  /* Airbnb Light Palette */
  --primary: #ff385c;
  --primary-active: #e00b41;
  --primary-disabled: #ffd1da;
  --primary-light: #fff0f3;
  
  --ink: #222222;
  --body: #3f3f3f;
  --muted: #6a6a6a;
  --muted-soft: #929292;
  
  --hairline: #dddddd;
  --hairline-soft: #ebebeb;
  --border-strong: #c1c1c1;
  
  --canvas: #ffffff;
  --surface-soft: #f7f7f7;
  --surface-card: #ffffff;
  
  --font-family: "Airbnb Cereal VF", Circular, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 12px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
  /* Airbnb Sleek Dark Palette */
  --canvas: #121214;
  --surface-soft: #1c1c1e;
  --surface-card: #1f1f23;
  
  --ink: #ffffff;
  --body: #e2e8f0;
  --muted: #94a3b8;
  --muted-soft: #64748b;
  
  --hairline: #2e2e34;
  --hairline-soft: #25252b;
  --border-strong: #3f3f46;
  
  --primary: #ff385c;
  --primary-active: #e00b41;
  --primary-light: rgba(255, 56, 92, 0.2);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-elevated: 0 12px 28px rgba(0, 0, 0, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--canvas);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.43;
  letter-spacing: 0;
  padding-bottom: 50px;
}

/* Airbnb Top Nav Header */
.airbnb-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 12px 18px;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.brand-text {
  min-width: 0;
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text p {
  font-size: 0.725rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-creator {
  color: var(--primary);
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Share & Theme Buttons */
.share-pill-btn {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 56, 92, 0.3);
  white-space: nowrap;
}

.share-pill-btn:hover {
  background: var(--primary-active);
  transform: translateY(-1px);
}

.theme-pill-btn {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  color: var(--ink);
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.theme-pill-btn:hover {
  border-color: var(--ink);
}

/* Page Container */
.page-container {
  max-width: 1080px;
  margin: 16px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Airbnb Live Status Card with Animated Progress */
.airbnb-live-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.live-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rausch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-active {
  background: var(--primary);
  color: #ffffff;
}

.badge-freetime {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.badge-upcoming {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  color: var(--ink);
}

.badge-off {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  color: var(--muted);
}

.pulsing-dot {
  width: 7px;
  height: 7px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: rauschPulse 1.5s infinite;
}

@keyframes rauschPulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(0.9); opacity: 1; }
}

.time-clock {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.live-subject-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.code-badge {
  font-size: 0.725rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  display: inline-block;
}

.code-badge-inline {
  font-size: 0.725rem;
  font-weight: 700;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 4px;
  display: inline-block;
  vertical-align: middle;
}

[data-theme="dark"] .code-badge,
[data-theme="dark"] .code-badge-inline {
  background: rgba(255, 56, 92, 0.25);
  color: #ff6b81;
  border: 1px solid rgba(255, 56, 92, 0.4);
}

.live-meta-row {
  display: flex;
  gap: 14px;
  font-size: 0.875rem;
  color: var(--body);
  font-weight: 500;
  flex-wrap: wrap;
}

/* Animated Lecture Progress Bar */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--muted);
}

.progress-header span strong {
  color: var(--primary);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--surface-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid var(--hairline-soft);
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff385c 0%, #e00b41 100%);
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(255, 56, 92, 0.5);
}

/* Airbnb Pill Segmented Navigation */
.airbnb-tabs {
  display: flex;
  background: var(--surface-soft);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  gap: 2px;
}

.tab-pill-btn {
  flex: 1;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.825rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.tab-pill-btn.active {
  background: var(--ink);
  color: var(--canvas);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .tab-pill-btn {
  color: #94a3b8;
}

[data-theme="dark"] .tab-pill-btn.active {
  background: #ffffff;
  color: #121214;
  font-weight: 700;
}

.new-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.55rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 8px;
  margin-left: 2px;
}

/* Day Selector Strip */
.day-scroll-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.day-scroll-strip::-webkit-scrollbar {
  display: none;
}

.day-bubble-btn {
  flex: 1 0 auto;
  min-width: 48px;
  padding: 9px 6px;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  font-weight: 600;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.day-bubble-btn:hover {
  border-color: var(--ink);
}

.day-bubble-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(255, 56, 92, 0.4);
}

[data-theme="dark"] .day-bubble-btn {
  background: var(--surface-card);
  border-color: var(--hairline);
  color: #cbd5e1;
}

[data-theme="dark"] .day-bubble-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Schedule Card Grid (Airbnb Property Card Style) */
.schedule-grid-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.airbnb-card {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: all 0.2s ease;
  border-left: 5px solid var(--card-accent, var(--primary));
}

.airbnb-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.airbnb-card.is-active-card {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-card);
}

/* Vibrant, Happy Recess & Lunch Break Cards */
.airbnb-card-break {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-left: 5px solid #10b981;
  border-radius: var(--radius-md);
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
  transition: all 0.2s ease;
}

.airbnb-card-break:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.15);
}

.break-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.break-icon {
  font-size: 1.4rem;
}

.break-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.break-sub {
  font-size: 0.775rem;
  color: var(--muted);
  font-weight: 500;
}

.break-duration-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 0.775rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

[data-theme="dark"] .airbnb-card-break {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(245, 158, 11, 0.12) 100%);
  border-color: rgba(16, 185, 129, 0.4);
  border-left-color: #34d399;
}

[data-theme="dark"] .break-duration-badge {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.card-tag {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.tag-pracs {
  background: #fff3e0;
  color: #d97706;
}

.tag-lecture {
  background: var(--primary-light);
  color: var(--primary);
}

[data-theme="dark"] .tag-pracs {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .tag-lecture {
  background: rgba(255, 56, 92, 0.25);
  color: #ff6b81;
  border: 1px solid rgba(255, 56, 92, 0.4);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.card-meta {
  display: flex;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  flex-wrap: wrap;
}

/* Academic Calendar Section Styles */
.calendar-banner {
  background: linear-gradient(135deg, rgba(255, 56, 92, 0.12) 0%, rgba(224, 11, 65, 0.06) 100%);
  border: 1px solid rgba(255, 56, 92, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner-icon {
  font-size: 1.6rem;
}

.banner-text h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.banner-text p {
  font-size: 0.8rem;
  color: var(--muted);
}

.calendar-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.calendar-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  color: var(--body);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-chip.active {
  background: var(--ink);
  color: var(--canvas);
  border-color: var(--ink);
}

[data-theme="dark"] .filter-chip {
  background: var(--surface-card);
  border-color: var(--hairline);
  color: #cbd5e1;
}

[data-theme="dark"] .filter-chip.active {
  background: #ffffff;
  color: #121214;
  border-color: #ffffff;
  font-weight: 700;
}

.calendar-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-card {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
  border-left: 5px solid var(--event-color, var(--primary));
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.event-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-box {
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  min-width: 80px;
}

.date-box .date-num {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
}

[data-theme="dark"] .date-box {
  background: #25252b;
  border-color: #383842;
}

[data-theme="dark"] .date-box .date-num {
  color: #ff6b81;
}

.event-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.event-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.event-category-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  width: fit-content;
  text-transform: uppercase;
}

.cat-holiday {
  background: #fff0f3;
  color: #ff385c;
}

.cat-exam {
  background: #e6f4ea;
  color: #137333;
}

.cat-event {
  background: #e8f2ff;
  color: #0066cc;
}

[data-theme="dark"] .cat-holiday {
  background: rgba(255, 56, 92, 0.25);
  color: #ff6b81;
}

[data-theme="dark"] .cat-exam {
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

[data-theme="dark"] .cat-event {
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

/* Toast Message Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #222222;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

[data-theme="dark"] .toast-notification {
  background: #ffffff;
  color: #121214;
}

/* Weekly Table View */
.table-card-container {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}

.airbnb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 750px;
}

.airbnb-table th, 
.airbnb-table td {
  padding: 10px 8px;
  border: 1px solid var(--hairline-soft);
  text-align: center;
  vertical-align: top;
}

.airbnb-table th {
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.775rem;
  font-weight: 700;
}

.time-header-col {
  background: var(--surface-soft);
  font-weight: 700;
  font-size: 0.775rem;
  color: var(--muted);
  white-space: nowrap;
}

.table-slot-item {
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  text-align: left;
  border-left: 3px solid var(--slot-accent, var(--primary));
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-slot-name {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink);
}

.table-slot-full {
  font-size: 0.7rem;
  color: var(--body);
  font-weight: 500;
  margin-bottom: 2px;
}

.table-slot-info {
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* Legend Section */
.airbnb-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--surface-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
}

.legend-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.legend-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--body);
  font-weight: 500;
}

.legend-dot-circle {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Footer & Watermark Styling */
.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  text-align: center;
}

.footer-watermark {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.2px;
  background: var(--primary-light);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 56, 92, 0.2);
}

[data-theme="dark"] .footer-watermark {
  background: rgba(255, 56, 92, 0.25);
  color: #ff6b81;
  border-color: rgba(255, 56, 92, 0.4);
}

/* Mobile Screen Special Breakpoint Adjustments (<500px) */
@media (max-width: 480px) {
  .airbnb-header {
    padding: 10px 12px;
  }
  
  .brand-text p {
    display: none;
  }

  .brand-text h1 {
    font-size: 0.95rem;
  }

  .share-pill-btn, .theme-pill-btn {
    padding: 5px 9px;
    font-size: 0.75rem;
  }

  .tab-label-full {
    display: none;
  }

  .tab-label-short {
    display: inline;
  }
}

@media (min-width: 481px) {
  .tab-label-short {
    display: none;
  }

  .tab-label-full {
    display: inline;
  }
}
