/* ===================================
   Calendar/Agenda Module Styles
   Stitch Curated Calendar v1.0
   =================================== */

/* ===== Section Container ===== */
#agenda-view {
  background-color: var(--bg-dark-primary);
  min-height: 100vh;
  padding: 0;
}

/* Module container (legacy) */
#module-agenda {
  min-height: calc(100vh - 120px);
  background-color: var(--bg-dark-primary);
  color: var(--text-dark-primary);
}

/* ===== Main Container ===== */
.agenda-container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4) calc(var(--space-12) * 2 + 110px);
}

/* ===== Hero Section ===== */
.agenda-hero {
  text-align: center;
  margin-bottom: var(--space-10);
}

.agenda-title {
  font-family: var(--font-ui);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: var(--weight-bold);
  color: var(--text-dark-primary);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.02em;
}

.agenda-subtitle {
  font-family: var(--font-ui);
  font-size: clamp(0.9375rem, 3.5vw, 1.0625rem);
  font-weight: var(--weight-light);
  color: var(--text-dark-muted);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Calendar Header ===== */
.calendar-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--bg-glass-dark);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.calendar-header-top {
  display: flex;
  align-items: center;
  padding: var(--space-4);
}

.calendar-header-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text-dark-secondary);
}

.calendar-header-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-dark-secondary);
  letter-spacing: -0.015em;
}

.calendar-header-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text-dark-secondary);
}

/* ===== Week Selector ===== */
.calendar-week-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-1) 0 var(--space-2);
}

.calendar-week-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-dark-subtle);
  border-radius: var(--radius-full);
  color: var(--text-dark-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.calendar-week-arrow:hover {
  background: var(--bg-glass-dark);
  color: var(--text-dark-secondary);
  border-color: var(--border-dark-secondary);
}

.calendar-week-arrow:active {
  transform: scale(0.95);
}

.calendar-week-arrow .material-symbols-outlined {
  font-size: 20px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'opsz' 20;
}

.calendar-week-dropdown-wrapper {
  position: relative;
}

.calendar-week-btn {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: 1px solid var(--border-dark-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-dark-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
  min-width: 140px;
  justify-content: center;
}

.calendar-week-btn:hover {
  background: var(--bg-glass-dark);
  border-color: var(--border-dark-secondary);
}

.calendar-week-chevron {
  font-size: 16px !important;
  transition: transform var(--duration-fast) var(--ease-in-out);
}

.calendar-week-dropdown-wrapper.open .calendar-week-chevron {
  transform: rotate(180deg);
}

.calendar-week-dropdown {
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--bg-dark-secondary);
  border: 1px solid var(--border-dark-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: all var(--duration-fast) var(--ease-out);
}

.calendar-week-dropdown-wrapper.open .calendar-week-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.calendar-week-option {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: none;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-dark-muted);
  text-align: left;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.calendar-week-option:hover {
  background: var(--bg-glass-dark);
  color: var(--text-dark-secondary);
}

.calendar-week-option.active {
  background: rgba(232, 171, 48, 0.1);
  color: var(--brand-gold);
  font-weight: var(--weight-semibold);
}

.calendar-week-option:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.calendar-week-option:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ===== Day Navigation ===== */
.calendar-days-nav {
  display: flex;
  justify-content: space-around;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-dark-subtle);
  border-bottom: 1px solid var(--border-dark-subtle);
  background: var(--bg-glass-dark);
}

.calendar-day-link {
  padding: var(--space-1);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  color: var(--text-dark-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-in-out);
}

.calendar-day-link:hover {
  color: var(--text-dark-secondary);
}

.calendar-day-link.active {
  position: relative;
  font-weight: var(--weight-semibold);
  color: var(--text-dark-secondary);
}

.calendar-day-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--text-dark-secondary);
}

/* ===== Events Container ===== */
.calendar-events {
  flex: 1;
  padding: var(--space-2) var(--space-4);
}

/* ===== Day Separator ===== */
.calendar-day-separator {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6) 0;
}

.calendar-day-separator-line {
  flex: 1;
  height: 1px;
  background: var(--border-dark-subtle);
}

.calendar-day-separator-text {
  flex-shrink: 0;
  padding: 0 var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--text-dark-subtle);
  letter-spacing: 0.015em;
}

/* ===== Event Card ===== */
.calendar-event-card {
  position: relative;
  margin-bottom: var(--space-8);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.calendar-event-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background-size: cover;
  background-position: center;
}

.calendar-event-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.20) 50%, transparent);
  pointer-events: none;
}

.calendar-event-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4);
}

.calendar-event-title {
  font-family: var(--font-ui);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-dark-secondary);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}

.calendar-event-action {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-dark-secondary);
  border-radius: var(--radius-full);
  color: var(--text-dark-secondary);
  opacity: 0.9;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* ===== Event Meta ===== */
.calendar-event-meta {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) var(--space-1) 0;
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-dark-muted);
}

.calendar-event-time {
  font-weight: var(--weight-medium);
}

.calendar-event-location {
  font-weight: var(--weight-bold);
}

/* ===== Coming Soon State ===== */
.calendar-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: var(--space-8);
  text-align: center;
}

.calendar-coming-soon-icon {
  font-size: 64px;
  margin-bottom: var(--space-6);
  opacity: 0.6;
}

.calendar-coming-soon-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  color: var(--text-dark-primary);
  margin-bottom: var(--space-2);
}

.calendar-coming-soon-text {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--weight-light);
  color: var(--text-dark-muted);
  max-width: 300px;
  line-height: var(--leading-relaxed);
}

.calendar-coming-soon-eta {
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-4);
  background: rgba(232, 171, 48, 0.1);
  border: 1px solid rgba(232, 171, 48, 0.2);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--brand-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Header Buttons ===== */
.calendar-header-menu,
.calendar-header-search {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-in-out);
}

.calendar-header-menu:hover,
.calendar-header-search:hover {
  opacity: 0.7;
}

.calendar-header-menu .material-symbols-outlined,
.calendar-header-search .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'opsz' 24;
}


/* ===== Event Card Interactions ===== */
.calendar-event-card {
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.calendar-event-card:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.calendar-event-card:active {
  transform: scale(0.98);
}

/* ===== Event Action Button ===== */
.calendar-event-action {
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.calendar-event-action:hover {
  background: rgba(17, 212, 115, 0.3);
  transform: scale(1.1);
}

.calendar-event-action .material-symbols-outlined {
  font-size: 20px;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'opsz' 20;
}

/* ===== Empty State ===== */
.calendar-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 250px);
  padding: var(--space-8);
  text-align: center;
}

.calendar-empty-text {
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--text-dark-secondary);
  margin: 0 0 var(--space-2);
}

.calendar-empty-hint {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-light);
  color: var(--text-dark-muted);
  margin: 0;
}

/* ===== Bottom Spacer ===== */
.calendar-spacer {
  height: calc(var(--space-10, 40px) + 80px);
}
