/**
 * Online Booking - Preview and Settings page
 *
 * Feature-specific styling only.
 * Reuses: swp-card, swp-card-header, swp-card-title, swp-edit-section,
 *         swp-toggle-row, swp-url-field, swp-hours-table (components.css, settings.css)
 */

/* ===========================================
   PAGE LAYOUT (Two-column)
   =========================================== */
swp-online-booking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--card-gap);
  align-items: start;
}

@media (max-width: 1200px) {
  swp-online-booking-layout {
    grid-template-columns: 1fr;
  }

  swp-online-booking-preview-container {
    order: -1;
  }
}

/* ===========================================
   SETTINGS COLUMN
   =========================================== */
swp-online-booking-settings {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

/* URL Actions (below URL field) */
swp-url-actions {
  display: flex;
  gap: var(--spacing-3);
  margin-top: var(--spacing-4);
}

/* All Settings Link */
swp-all-settings-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  padding: var(--spacing-4);
  color: var(--color-teal);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: opacity var(--transition-fast);
  text-decoration: none;

  &:hover {
    opacity: 0.8;
  }

  & i {
    font-size: 18px;
  }
}

/* ===========================================
   PREVIEW COLUMN
   =========================================== */
swp-online-booking-preview-container {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: calc(var(--sticky-header-height, 120px) + var(--section-gap));
}

swp-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4) var(--spacing-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

swp-preview-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  color: var(--color-text);

  & i {
    font-size: 18px;
    color: var(--color-teal);
  }
}

/* ===========================================
   DEVICE TOGGLE
   =========================================== */
swp-device-toggle {
  display: flex;
  gap: var(--spacing-1);
  padding: var(--spacing-1);
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
}

swp-device-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);

  & i {
    font-size: 18px;
  }

  &:hover {
    background: var(--color-background);
    color: var(--color-text);
  }

  &.active {
    background: var(--color-teal);
    color: white;
  }
}

/* ===========================================
   PREVIEW FRAME
   =========================================== */
swp-preview-frame {
  display: flex;
  justify-content: center;
  padding: var(--spacing-6);
  background: var(--color-background-alt);
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  min-height: 600px;
  overflow: hidden;
}

swp-preview-content {
  width: 100%;
  max-width: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

/* Device variants */
swp-preview-frame[data-device="desktop"] swp-preview-content {
  max-width: 100%;
}

swp-preview-frame[data-device="tablet"] swp-preview-content {
  max-width: 768px;
}

swp-preview-frame[data-device="mobile"] swp-preview-content {
  max-width: 375px;
}

/* ===========================================
   BOOKING DEMO (Placeholder UI)
   =========================================== */
swp-booking-demo {
  display: flex;
  flex-direction: column;
  height: 100%;
}

swp-booking-demo-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
  padding: var(--spacing-6);
  background: linear-gradient(135deg, var(--color-teal), #00796b);
  color: white;
}

swp-booking-demo-logo {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
}

swp-booking-demo-info {
  & h2 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin: 0 0 var(--spacing-1) 0;
  }

  & p {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin: 0;
  }
}

swp-booking-demo-section {
  padding: var(--spacing-5);
  border-bottom: 1px solid var(--color-border);

  & h3 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin: 0 0 var(--spacing-4) 0;
  }
}

/* Services list */
swp-booking-demo-services {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);
}

swp-booking-demo-service {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-3) var(--spacing-4);
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);

  &:hover {
    background: var(--color-background-hover);
  }

  &.selected {
    background: var(--bg-teal-strong);
    border: 1px solid var(--color-teal);
  }

  & .name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
  }

  & .meta {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
  }
}

/* Employees list */
swp-booking-demo-employees {
  display: flex;
  gap: var(--spacing-3);
  flex-wrap: wrap;
}

swp-booking-demo-employee {
  display: flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: var(--spacing-2) var(--spacing-4) var(--spacing-2) var(--spacing-2);
  background: var(--color-background-alt);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);

  &:hover {
    background: var(--color-background-hover);
  }

  &.selected {
    background: var(--bg-teal-strong);
    border: 1px solid var(--color-teal);
  }

  & span {
    font-size: var(--font-size-sm);
    color: var(--color-text);
  }
}

/* Calendar */
swp-booking-demo-calendar {
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
  padding: var(--spacing-4);
}

swp-booking-demo-month {
  display: block;
  text-align: center;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--spacing-4);
}

swp-booking-demo-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--spacing-1);
  text-align: center;

  & .day-header {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    padding: var(--spacing-2);
  }

  & .day {
    font-size: var(--font-size-sm);
    padding: var(--spacing-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);

    &:hover {
      background: var(--color-background-hover);
    }

    &.selected {
      background: var(--color-teal);
      color: white;
    }

    &.other {
      color: var(--color-text-muted);
    }
  }
}

swp-booking-demo-footer {
  padding: var(--spacing-5);
  margin-top: auto;
}
