/* ===================================
   STAFF PORTAL SPA
   Extends base profile-app.css styles
   =================================== */

/* --- Hide theme header/footer/adminbar when Staff SPA is active --- */
body:has(.abs-staff-shell) #main-header,
body:has(.abs-staff-shell) .et-l--header,
body:has(.abs-staff-shell) #top-header,
body:has(.abs-staff-shell) #main-footer,
body:has(.abs-staff-shell) .et-l--footer,
body:has(.abs-staff-shell) #footer-bottom,
body:has(.abs-staff-shell) .et_pb_menu,
body:has(.abs-staff-shell) .et-l--body .et_pb_section:not(:has(.abs-staff-shell)),
body:has(.abs-staff-shell) #wpadminbar {
  display: none !important;
}

body:has(.abs-staff-shell) {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* --- Force Divi wrappers to be full-width & no spacing --- */
body:has(.abs-staff-shell) #page-container,
body:has(.abs-staff-shell) #et-main-area,
body:has(.abs-staff-shell) .et_builder_inner_content,
body:has(.abs-staff-shell) .et_pb_section,
body:has(.abs-staff-shell) .et_pb_row,
body:has(.abs-staff-shell) .et_pb_column,
body:has(.abs-staff-shell) .et_pb_module,
body:has(.abs-staff-shell) .et_pb_text_inner,
body:has(.abs-staff-shell) .entry-content,
body:has(.abs-staff-shell) .et-l--body {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

body:has(.abs-staff-shell) #page-container {
  padding-top: 0 !important;
  margin-top: 0 !important;
  overflow-x: hidden;
  overflow-y: visible !important;
}

/* Ensure sticky works — no overflow:hidden on ancestors */
body:has(.abs-staff-shell) #et-main-area,
body:has(.abs-staff-shell) .et_builder_inner_content,
body:has(.abs-staff-shell) .et_pb_section,
body:has(.abs-staff-shell) .et_pb_row,
body:has(.abs-staff-shell) .et_pb_column,
body:has(.abs-staff-shell) .et_pb_module,
body:has(.abs-staff-shell) .entry-content {
  overflow: visible !important;
}

/* Staff badge in header */
.abs-staff-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #6366f1;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.abs-staff-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #fff;
}

.abs-staff-header .abs-app-logo { color: #fff; }
.abs-staff-header .abs-app-header-actions a { color: #c7d2fe; }
.abs-staff-header .abs-app-header-actions a:hover { color: #fff; }

/* ---- Dashboard ---- */
.abs-staff-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .abs-staff-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Booking Cards ---- */
.abs-staff-booking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.abs-staff-booking-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.abs-staff-booking-card:hover { border-color: #c7d2fe; }

/* Top row: date/time + service/client */
.abs-staff-booking-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 10px;
}

.abs-staff-booking-datetime {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  min-width: 80px;
}

.abs-staff-booking-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.abs-staff-booking-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #6366f1;
  white-space: nowrap;
}

.abs-staff-booking-time svg { flex-shrink: 0; width: 14px; height: 14px; }

.abs-staff-booking-info { flex: 1; min-width: 0; }

.abs-staff-booking-service {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.abs-staff-booking-client {
  font-size: 0.8rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Bottom row: status + actions */
.abs-staff-booking-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 12px;
  border-top: 1px dashed #e2e8f0;
}

.abs-staff-booking-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .abs-staff-booking-top {
    flex-wrap: wrap;
    gap: 8px;
  }
  .abs-staff-booking-datetime {
    flex-direction: row;
    gap: 10px;
    width: 100%;
  }
  .abs-staff-booking-bottom {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* Status badge */
.abs-staff-status {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  background: color-mix(in srgb, var(--status-color) 15%, transparent);
  color: var(--status-color);
  border: 1px solid color-mix(in srgb, var(--status-color) 30%, transparent);
}

/* Extra-small buttons */
.abs-btn-xs {
  padding: 4px 8px !important;
  font-size: 0.75rem !important;
  border-radius: 6px !important;
  line-height: 1 !important;
}

.abs-btn-xs svg { width: 14px; height: 14px; }

.abs-btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.abs-btn-ghost:hover { background: #f1f5f9; }

.abs-btn-lg {
  padding: 12px 24px !important;
  font-size: 1rem !important;
}

/* ---- Section headers ---- */
.abs-staff-section {
  margin-bottom: 24px;
}

.abs-staff-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px;
}

.abs-staff-section-header {
  margin-bottom: 16px;
}

.abs-staff-section-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.abs-staff-empty {
  text-align: center;
  padding: 32px 16px;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ---- Filters ---- */
.abs-staff-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ---- Pagination ---- */
.abs-staff-pagination {
  margin-top: 16px;
}

.abs-staff-pagination-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.abs-staff-page-info {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 500;
}

/* ---- Quick actions (dashboard) ---- */
.abs-dash-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 500px) {
  .abs-dash-actions { grid-template-columns: 1fr; }
}

.abs-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.abs-action-card:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
}

.abs-action-card svg { color: #6366f1; }

/* ===================================
   STAFF CALENDAR (WEEKLY)
   =================================== */
.abs-staff-cal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.abs-staff-cal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  flex: 1;
  text-align: center;
}

.abs-staff-cal-today { margin-left: auto; }

.abs-staff-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

@media (max-width: 768px) {
  .abs-staff-week-grid {
    grid-template-columns: 1fr;
  }
}

.abs-staff-week-day {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  min-height: 120px;
}

.abs-staff-today { border-color: #6366f1; }

.abs-staff-week-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.abs-staff-today .abs-staff-week-day-header { background: #eef2ff; }

.abs-staff-week-dayname {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.abs-staff-week-daynum {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

.abs-today-num {
  background: #6366f1;
  color: #fff;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.abs-staff-week-day-slots {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.abs-staff-slot {
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef2ff;
  border-left: 3px solid #6366f1;
  font-size: 0.78rem;
}

.abs-staff-slot-confirmed { border-left-color: #10b981; background: #ecfdf5; }
.abs-staff-slot-completed { border-left-color: #6366f1; background: #eef2ff; }
.abs-staff-slot-pending   { border-left-color: #f59e0b; background: #fffbeb; }

.abs-staff-slot-time {
  font-weight: 700;
  color: #334155;
  display: block;
}

.abs-staff-slot-client {
  color: #475569;
  font-weight: 500;
  display: block;
}

.abs-staff-slot-service {
  color: #94a3b8;
  font-size: 0.72rem;
  display: block;
}

.abs-staff-slot-empty {
  text-align: center;
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 12px 4px;
}

/* ===================================
   STAFF NEW BOOKING FORM
   =================================== */
.abs-staff-new-view {
  max-width: 560px;
}

.abs-staff-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.abs-staff-fieldset {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin: 0;
}

.abs-staff-fieldset legend {
  font-weight: 700;
  font-size: 0.9rem;
  color: #334155;
  padding: 0 8px;
}

.abs-staff-form .abs-form-group {
  margin-bottom: 12px;
}

.abs-staff-form .abs-form-group:last-child {
  margin-bottom: 0;
}

.abs-staff-form .abs-form-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #475569;
}

.abs-staff-form .abs-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.95rem;
  color: #1e293b;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.abs-staff-form .abs-form-input:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.abs-form-row {
  display: flex;
  gap: 12px;
}

.abs-form-half { flex: 1; }

@media (max-width: 480px) {
  .abs-form-row { flex-direction: column; gap: 0; }
}

.abs-staff-form-actions {
  padding-top: 8px;
}

/* ---- View Placeholder ---- */
.abs-view-placeholder {
  text-align: center;
  padding: 48px 16px;
  color: #94a3b8;
}

.abs-view-placeholder svg {
  margin-bottom: 12px;
  color: #cbd5e1;
}

.abs-view-placeholder h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: #64748b;
}

.abs-view-placeholder p {
  margin: 0;
  font-size: 0.9rem;
}

/* ===================================
   CLIENT SEARCH AUTOCOMPLETE
   =================================== */
.abs-search-wrap {
  position: relative;
}

.abs-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
}

.abs-search-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid #f1f5f9;
}

.abs-search-item:last-child { border-bottom: none; }
.abs-search-item:hover { background: #eef2ff; }

.abs-search-item strong {
  font-size: 0.9rem;
  color: #1e293b;
}

.abs-search-item span {
  font-size: 0.78rem;
  color: #64748b;
}

.abs-search-empty {
  padding: 12px 14px;
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
}

/* ===================================
   TIME SLOTS GRID
   =================================== */
.abs-slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.abs-slot-btn {
  padding: 8px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  min-width: 64px;
  text-align: center;
}

.abs-slot-btn:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4f46e5;
}

.abs-slot-btn.selected {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

.abs-slots-loading,
.abs-slots-empty,
.abs-slots-error {
  padding: 16px 0;
  color: #94a3b8;
  font-size: 0.88rem;
  text-align: center;
}

.abs-slots-error { color: #ef4444; }

/* ===================================
   FORCE OUTSIDE SCHEDULE
   =================================== */
.abs-force-schedule {
  margin-top: 8px;
}

.abs-toggle-inline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.4;
}

.abs-toggle-inline input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #6366f1;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===================================
   MINI CALENDAR WIDGET
   =================================== */
.abs-mini-cal {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.abs-mini-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.abs-mini-cal-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1e293b;
}

.abs-mini-cal-nav {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s;
}

.abs-mini-cal-nav:hover {
  background: #f1f5f9;
  border-color: #c7d2fe;
  color: #4f46e5;
}

.abs-mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.abs-mini-cal-dayname {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  padding: 4px 0;
}

.abs-mini-cal-cell {
  text-align: center;
  padding: 8px 2px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.1s;
  color: #475569;
}

.abs-mini-cal-cell.empty {
  cursor: default;
}

.abs-mini-cal-cell.past {
  color: #cbd5e1;
  cursor: default;
}

.abs-mini-cal-cell.working {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 700;
}

.abs-mini-cal-cell.working:hover {
  background: #c7d2fe;
}

.abs-mini-cal-cell.off {
  color: #94a3b8;
  background: #f8fafc;
}

.abs-mini-cal-cell.off:hover {
  background: #f1f5f9;
}

.abs-mini-cal-cell.selected {
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
}

.abs-mini-cal-days {
  margin-bottom: 4px;
}

/* ===================================
   STAFF SETTINGS VIEW
   =================================== */

/* Settings sections (reuse profile-app settings styles) */
.abs-staff-shell .abs-settings-section {
  margin-bottom: 28px;
}

.abs-staff-shell .abs-settings-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.abs-staff-shell .abs-settings-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 500px) {
  .abs-staff-shell .abs-settings-form-grid { grid-template-columns: 1fr; }
}

.abs-staff-shell .abs-settings-field { margin-bottom: 10px; }

.abs-staff-shell .abs-settings-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.abs-staff-shell .abs-settings-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.92rem;
  color: #1e293b;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.abs-staff-shell .abs-settings-input:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.abs-staff-shell .abs-settings-input[readonly] {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.abs-staff-shell .abs-settings-note {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 4px 0 12px;
}

/* Schedule table */
.abs-staff-schedule-table {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.abs-schedule-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  font-size: 0.88rem;
}

.abs-schedule-row:last-child { border-bottom: none; }

.abs-schedule-header {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.03em;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2e8f0;
}

.abs-schedule-day {
  font-weight: 600;
  color: #1e293b;
}

.abs-schedule-off {
  color: #cbd5e1;
}

.abs-schedule-off .abs-schedule-day { color: #cbd5e1; }

.abs-schedule-closed {
  color: #ef4444;
  font-weight: 600;
  font-size: 0.82rem;
}

@media (max-width: 500px) {
  .abs-schedule-row { grid-template-columns: 90px 1fr 1fr; font-size: 0.8rem; }
}

/* Services list */
.abs-staff-services-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.abs-staff-service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.abs-staff-service-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1e293b;
}

.abs-staff-service-meta {
  font-size: 0.82rem;
  color: #64748b;
  white-space: nowrap;
}

/* Special dates */
.abs-staff-special-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}

.abs-staff-special-row:last-child { border-bottom: none; }

.abs-staff-special-type {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: #6366f1;
  min-width: 90px;
}

.abs-staff-special-reason {
  color: #94a3b8;
  font-style: italic;
}

/* Booking phone display */
.abs-staff-booking-phone {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-left: 4px;
}

/* Contact actions group */
.abs-staff-booking-contact {
  display: inline-flex;
  gap: 4px;
  margin-left: 4px;
}

/* Outline button */
.abs-btn-outline {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #64748b;
  transition: all 0.12s;
}

.abs-btn-outline:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: #eef2ff;
}

/* WhatsApp green accent */
.abs-btn-wa { color: #25d366; border-color: #25d366; }
.abs-btn-wa:hover { background: #dcfce7; color: #128c7e; border-color: #128c7e; }

/* ===================================
   SCHEDULE MANAGEMENT VIEW
   =================================== */

/* Tab row */
.abs-sched-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.abs-sched-tab-btn {
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  padding: 7px 16px !important;
  transition: all 0.15s ease;
}

/* Working hours summary */
.abs-sched-wh-summary {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.abs-sched-wh-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 8px;
}

.abs-sched-wh-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.abs-sched-wh-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
}

.abs-sched-wh-pill.working {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.abs-sched-wh-pill.off {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.abs-sched-wh-pill strong {
  font-weight: 700;
}

/* Form card */
.abs-sched-form {
  margin-bottom: 20px;
}

.abs-sched-form h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.abs-sched-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.abs-sched-form-row .abs-settings-field {
  flex: 1;
  min-width: 140px;
}

/* Item list */
.abs-sched-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.abs-sched-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.abs-sched-item:hover {
  border-color: #c7d2fe;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.abs-sched-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.abs-sched-item-date {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.88rem;
  white-space: nowrap;
}

.abs-sched-item-time {
  font-size: 0.82rem;
  color: #475569;
  font-weight: 500;
  white-space: nowrap;
}

.abs-sched-item-reason,
.abs-sched-item-until {
  font-size: 0.78rem;
  color: #94a3b8;
  font-style: italic;
}

/* Type badges */
.abs-sched-item-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.abs-sched-type-holiday {
  background: #fef3c7;
  color: #92400e;
}

.abs-sched-type-closed {
  background: #fee2e2;
  color: #991b1b;
}

.abs-sched-type-special_hours {
  background: #dbeafe;
  color: #1e40af;
}

.abs-sched-type-recurring {
  background: #ede9fe;
  color: #5b21b6;
}

/* Delete button on items */
.abs-sched-delete {
  flex-shrink: 0;
}

/* Empty state */
.abs-sched-empty {
  text-align: center;
  padding: 32px 16px;
  color: #94a3b8;
  font-size: 0.9rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #e2e8f0;
}

/* Sub-tabs (inside Nueva cita tab) */
.abs-sched-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
}

.abs-sched-subtab {
  flex: 1;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.abs-sched-subtab.active {
  background: #fff;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.abs-sched-subtab:hover:not(.active) {
  color: #334155;
}

/* Slot grid (manual blocks toggle) */
.abs-sched-slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 40px;
}

.abs-sched-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid;
  cursor: pointer;
  transition: all 0.15s ease;
}

.abs-sched-slot.available {
  background: #ecfdf5;
  border-color: #86efac;
  color: #065f46;
}
.abs-sched-slot.available:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

.abs-sched-slot.blocked {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}
.abs-sched-slot.blocked:hover {
  background: #fee2e2;
  border-color: #f87171;
}

.abs-sched-slot.booked {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.6;
}

.abs-sched-slot:disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Day checkboxes (recurring bookings) */
.abs-sched-day-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.abs-sched-day-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
}

.abs-sched-day-check:has(input:checked) {
  background: #eef2ff;
  border-color: #818cf8;
  color: #4338ca;
}

/* Custom date tags */
.abs-sched-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.abs-sched-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.abs-sched-tag-rm {
  background: none;
  border: none;
  cursor: pointer;
  color: #ef4444;
  font-weight: bold;
  font-size: 0.85rem;
  padding: 0 2px;
  line-height: 1;
}

/* Reminder cooldown badge */
.abs-reminder-info {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #94a3b8;
  margin-left: 4px;
}

.abs-reminder-cooldown {
  color: #f59e0b;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
  .abs-sched-form-row {
    flex-direction: column;
    gap: 10px;
  }

  .abs-sched-form-row .abs-settings-field {
    min-width: 100%;
  }

  .abs-sched-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .abs-sched-item-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .abs-sched-delete {
    align-self: flex-end;
  }

  .abs-sched-wh-pills {
    gap: 4px;
  }

  .abs-sched-slots-grid {
    gap: 4px;
  }

  .abs-sched-slot {
    min-width: 56px;
    font-size: 0.75rem;
    padding: 5px 8px;
  }
}
