/* ==========================================================================
   AVAILABILITY / WEEKLY SLOT MATRIX STYLESHEET
   Matches Uzbek Made Easy design system (navy #062a63, cream #faf6f0, teal #08637b)
   ========================================================================== */

.avail-section {
  padding-top: var(--space-4, 32px);
  padding-bottom: var(--space-6, 64px);
}

/* Timezone Toggle Bar */
.avail-tz-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  gap: 10px;
}

.avail-tz-bar {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid rgba(11, 43, 89, 0.14);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(6, 42, 99, 0.04);
  max-width: 100%;
}

.tz-pill {
  border: none;
  background: transparent;
  color: #0b2b59;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.tz-pill:hover:not(.active) {
  background: rgba(11, 43, 89, 0.05);
}

.tz-pill.active {
  background: #062a63;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(6, 42, 99, 0.25);
}

.tz-pill-name {
  font-size: 12px;
  opacity: 0.85;
  font-weight: 500;
}

.avail-tz-note {
  font-size: 13px;
  color: #5a6e85;
  text-align: center;
}

/* Week Navigation Controls */
.avail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  background: #ffffff;
  border: 1px solid rgba(11, 43, 89, 0.1);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 2px 10px rgba(6, 42, 99, 0.03);
}

.week-nav-btn {
  background: #ffffff;
  border: 1.5px solid rgba(11, 43, 89, 0.2);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: #062a63;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.week-nav-btn:hover:not(:disabled) {
  background: #062a63;
  color: #ffffff;
  border-color: #062a63;
}

.week-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.week-nav-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.week-range-text {
  font-size: 17px;
  font-weight: 700;
  color: #071f42;
  font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
}

.today-jump-btn {
  background: #e7f2f5;
  color: #08637b;
  border: 1px solid rgba(8, 99, 123, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.today-jump-btn:hover {
  background: #08637b;
  color: #ffffff;
}

/* Legend bar */
.avail-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: #5a6e85;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.swatch-avail {
  background: #ffffff;
  border: 1.5px solid #062a63;
}

.swatch-selected {
  background: #062a63;
}

.swatch-booked {
  background: #e2e8f0;
  opacity: 0.6;
}

/* Mobile Day Selector Tabs (< 768px) */
.mobile-day-tabs {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-day-tabs::-webkit-scrollbar {
  display: none;
}

.mobile-day-tab {
  flex: 1;
  min-width: 44px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 1.5px solid rgba(11, 43, 89, 0.14);
  background: #ffffff;
  color: #0b2b59;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-day-tab.active {
  background: #062a63;
  color: #ffffff;
  border-color: #062a63;
}

/* 7-Column Weekly Slot Matrix */
.avail-matrix-wrapper {
  position: relative;
  width: 100%;
}

.avail-matrix {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  width: 100%;
}

.avail-day-col {
  background: #ffffff;
  border: 1px solid rgba(11, 43, 89, 0.12);
  border-radius: 16px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(6, 42, 99, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.avail-day-col.is-today {
  border: 2px solid #08637b;
  background: #fbfdfe;
}

.day-col-header {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(11, 43, 89, 0.08);
}

.today-badge {
  display: inline-block;
  background: #08637b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.day-name {
  font-size: 13.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #071f42;
}

.day-date {
  font-size: 13px;
  font-weight: 600;
  color: #5a6e85;
  margin-top: 2px;
}

.day-slots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* Slot Pills */
.slot-pill {
  width: 100%;
  padding: 8px 6px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  border: 1.5px solid #062a63;
  background: #ffffff;
  color: #062a63;
  box-shadow: 0 1px 3px rgba(6, 42, 99, 0.05);
}

.slot-pill:hover:not(.is-booked):not(.is-selected) {
  background: #edf3fa;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(6, 42, 99, 0.12);
}

.slot-pill.is-selected {
  background: #062a63 !important;
  color: #ffffff !important;
  border-color: #062a63 !important;
  box-shadow: 0 4px 12px rgba(6, 42, 99, 0.3) !important;
  transform: scale(1.02);
}

.slot-pill.is-booked {
  opacity: 0.45;
  pointer-events: none;
  background: #eef2f6;
  color: #78889b;
  border-color: transparent;
  text-decoration: line-through;
  font-weight: 500;
  box-shadow: none;
}

.no-slots-msg {
  text-align: center;
  color: #8a9bb0;
  font-size: 12px;
  font-style: italic;
  padding: 24px 4px;
}

/* Bottom Action Bar */
.avail-action-bar {
  margin-top: 32px;
  background: #ffffff;
  border: 1.5px solid rgba(11, 43, 89, 0.14);
  border-radius: 18px;
  padding: 22px 28px;
  box-shadow: 0 6px 24px rgba(6, 42, 99, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.action-bar-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 260px;
}

.selected-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #08637b;
}

.selected-title {
  font-size: 19px;
  font-weight: 700;
  color: #071f42;
  font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
}

.action-helper-txt {
  font-size: 14px;
  color: #5a6e85;
  margin: 0;
}

.action-btn-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-book-wa {
  background-color: #062a63;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(6, 42, 99, 0.25);
  white-space: nowrap;
}

.btn-book-wa:hover {
  background-color: #08637b;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(8, 99, 123, 0.3);
  color: #ffffff;
}

.btn-book-wa svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Responsive Mobile Layout (< 768px) */
@media (max-width: 900px) {
  .mobile-day-tabs {
    display: flex;
  }

  .avail-matrix {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .avail-day-col {
    min-width: 140px;
    flex: 0 0 calc(50% - 6px);
    scroll-snap-align: start;
    padding: 14px 6px;
  }

  .avail-action-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 18px;
  }

  .action-bar-info {
    min-width: unset;
  }

  .btn-book-wa {
    width: 100%;
    justify-content: center;
  }

  .avail-legend {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .avail-day-col {
    min-width: 130px;
    flex: 0 0 calc(70% - 6px);
  }

  .tz-pill {
    padding: 8px 12px;
    font-size: 13px;
  }

  .week-range-text {
    font-size: 15px;
  }

  .week-nav-btn {
    padding: 6px 12px;
    font-size: 12.5px;
  }
}
