/* 
 * Google Cloud Event Agenda Premium Design System
 * Optimized for High-Fidelity Mockup Compatibility
 */

:root {
  --bg-color: #f8f9fa;
  --text-color: #202124;
  --secondary-text: #5f6368;
  --accent-blue: #1a73e8;
  --nav-bg: #ffffff;
  --border-radius: 16px;
  --border-color: rgba(0, 0, 0, 0.06);
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  --active-blue-bg: #e8f0fe;
  --active-blue-border: #1a73e8;
}

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

html,
body {
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
  /* Prevent all elastic window bounce shifts */
}

body {
  font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
  background-color: #e0e2e6;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Center mobile frame container */
.app-container {
  width: 100%;
  max-width: 440px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f4 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border-radius: 40px;
  border: 8px solid #000000;
  /* Simulated elegant phone bezels */
  overflow: hidden;
}

/* Top Header Group (Sticky to prevent scroll hide on mobile) */
.app-header-group {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  /* Solid background keeps scrolled cards from bleeding behind it */
  display: flex;
  flex-direction: column;
  touch-action: none;
  /* Freeze viewport dragging shifts from top header area */
}

/* Header section */
header {
  padding: 16px 20px 8px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

.logo-img {
  height: 26px;
  display: block;
}

/* Mockup Glassmorphism Search Bar */
.search-container {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  padding: 10px 16px;
  margin: 0 20px 15px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  gap: 10px;
}

.search-icon {
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-color);
}

.search-clear-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--secondary-text);
  font-size: 1.3rem;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  outline: none;
  transition: color 0.2s;
}

.search-clear-btn:hover {
  color: var(--text-color);
}

/* Search Suggestions Panel Dropdown */
.search-suggestions-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 16px;
  margin: -5px 20px 15px 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideDown 0.2s ease;
  z-index: 99;
}

.suggestions-close-btn {
  background-color: #fff;
  height: 20px;
  width: 20px;
  border: 1px solid var(--border-color);

}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestions-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--secondary-text);
  margin-bottom: 2px;
}

.suggestions-tags {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.suggestion-tag {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  background: var(--bg-color);
  color: var(--accent-blue);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
  text-align: left;
  display: block;
  width: 100%;
}

.suggestion-tag:hover {
  background: var(--active-blue-bg);
  border-color: var(--active-blue-border);
}

.suggestion-tag:active {
  transform: scale(0.95);
}

.notification-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--secondary-text);
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.notification-btn:active {
  transform: scale(0.9);
}

/* Scrollable Agenda Panel */
#agenda-panel {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px 30px 20px;
  scrollbar-width: none;
  /* Firefox */
}

#agenda-panel::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

/* Timeline Slot Row Grid */
.agenda-row {
  display: flex;
  position: relative;
  margin-bottom: 15px;
}

/* Left Time Indicator Column */
.agenda-time-col {
  width: 55px;
  text-align: right;
  padding-top: 12px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.time-hours {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
}

.time-ampm {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary-text);
}

/* Center Timeline Path Column */
.agenda-timeline-col {
  width: 26px;
  position: relative;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

/* The vertical path line running between time slots */
.agenda-timeline-col::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: -15px;
  /* Extend to connect with the next row */
  width: 2px;
  background-color: rgba(0, 0, 0, 0.08);
  z-index: 1;
}

/* Remove timeline path overflow on the last element */
.agenda-row:last-child .agenda-timeline-col::before {
  bottom: 50%;
}

/* The slot dot indicator */
.agenda-timeline-col::after {
  content: '';
  position: absolute;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.15);
  z-index: 2;
}

/* Glowing dot for active slot */
.agenda-row.active .agenda-timeline-col::after {
  background-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.25);
}

/* Right Card Column */
.agenda-card-col {
  flex: 1;
  position: relative;
}

/* Premium Grouped Card Container Styling */
.agenda-card-container {
  background: #ffffff;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.agenda-card-container:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* Individual Session Row inside Group */
.agenda-session-row {
  display: flex;
  gap: 12px;
  padding: 14px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s, border-left-color 0.2s;
  border-bottom: 1px solid var(--border-color);
  border-left: 4px solid transparent;
}

.agenda-session-row:last-child {
  border-bottom: none;
}

.agenda-session-row:hover {
  background-color: rgba(0, 0, 0, 0.01);
}

/* Selected/Active Session Row styling */
.agenda-session-row.active {
  background-color: var(--active-blue-bg);
  border-left-color: var(--active-blue-border);
}

/* SELECTED badge styling */
.badge-selected {
  position: absolute;
  top: 0;
  right: 0;
  background: #1a73e8;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 10px;
  border-bottom-left-radius: 8px;
  letter-spacing: 0.3px;
}

/* Left graphic icon circle */
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background-color: #f1f3f4;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  /* Protect border radius for image children */
}

/* Custom session image styling */
.card-icon-img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

/* Icon containers */
.card-icon svg {
  width: 24px;
  height: 24px;
}

/* Card main text container */
.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.25;
  margin-bottom: 2px;
}

.card-desc {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--secondary-text);
  line-height: 1.3;
}

/* Chevron indicator arrow on active/selected cards */
.card-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  font-size: 1rem;
  padding-left: 4px;
}

/* Nested Bullet Sub-sessions */
.card-sub-list {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(26, 115, 232, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sub-time-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-text);
  margin-bottom: 2px;
  display: inline-block;
}

.sub-item {
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--text-color);
  position: relative;
  padding-left: 14px;
}

/* Custom bullet dots for subitems */
.sub-item::before {
  content: '•';
  position: absolute;
  left: 2px;
  color: var(--text-color);
  font-weight: bold;
}

/* Bottom Navigation Footer */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #ffffff;
  padding: 8px 0 18px 0;
  border-top: 1px solid var(--border-color);
  z-index: 10;
  position: relative;
  touch-action: none;
  /* Freeze viewport dragging shifts from bottom nav area */
}

.nav-btn {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: var(--secondary-text);
  width: 72px;
  transition: transform 0.15s;
  position: relative;
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn svg {
  width: 22px;
  height: 22px;
  color: var(--secondary-text);
  transition: color 0.2s;
  margin-bottom: 3px;
}

.nav-btn span {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--secondary-text);
  transition: color 0.2s;
}

/* SELECTED rounded pill for Bottom Navigation */
.nav-btn.active .nav-icon-wrapper {
  background-color: #e8f0fe;
  border-radius: 16px;
  padding: 4px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-btn.active svg {
  color: var(--accent-blue);
}

.nav-btn.active span {
  color: var(--accent-blue);
  font-weight: 600;
}

/* Icon wrapper for centering selection background */
.nav-icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 28px;
  transition: background-color 0.2s;
}

/* Gold star badge wrapper for messages */
.nav-btn .badge-star {
  position: absolute;
  top: -2px;
  right: 18px;
  width: 8px;
  height: 8px;
  background-color: #fbbc05;
  border-radius: 50%;
  border: 1px solid #ffffff;
}

/* Modals Overlay */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 20;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-content {
  background: #ffffff;
  padding: 24px;
  border-radius: 24px;
  text-align: center;
  width: 82%;
  max-height: 75%;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.modal-content h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-color);
}

.modal-content p {
  font-size: 0.9rem;
  color: var(--secondary-text);
  line-height: 1.45;
  margin-bottom: 16px;
}

.modal-content a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 8px;
  font-size: 0.95rem;
}

.close-btn {
  margin-top: 20px;
  padding: 10px 24px;
  border: none;
  border-radius: 20px;
  background: #f1f3f4;
  color: var(--text-color);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
  outline: none;
}

.close-btn:hover {
  background: #e8eaed;
}

/* Modal Detail styling */
#demo-detail-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 14px;
  object-fit: cover;
}

#demo-detail-location {
  font-size: 0.85rem;
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 10px;
}

/* Responsive Full-Screen for Mobile Devices */
@media (max-width: 600px) {
  body {
    background-color: var(--bg-color);
    align-items: stretch;
  }

  .app-container {
    max-width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
}