/* Yatoon Manage Booking - Customer Self-Service Styles */

.yatoon-manage-wrap {
    --yatoon-primary: #ec4899;
    --yatoon-primary-light: #fdf2f8;
    --yatoon-text: #1f2937;
    --yatoon-muted: #6b7280;
    --yatoon-border: #e5e7eb;
    --yatoon-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--yatoon-text);
    padding: 20px 16px 40px;
    max-width: 520px;
    margin: 0 auto;
}

.yatoon-manage-card {
    background: #fff;
    border: 1px solid var(--yatoon-border);
    border-radius: var(--yatoon-radius);
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    overflow: hidden;
}

.yatoon-manage-header {
    background: var(--yatoon-primary);
    color: #fff;
    padding: 24px 28px 20px;
}
.yatoon-manage-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    border: none;
}
.yatoon-manage-subtitle {
    margin: 0;
    font-size: 13px;
    opacity: .85;
}

.yatoon-manage-details {
    padding: 20px 28px;
    border-bottom: 1px solid var(--yatoon-border);
}
.yatoon-manage-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}
.yatoon-manage-row:last-child { border-bottom: none; }
.ymr-label {
    color: var(--yatoon-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex: 0 0 90px;
}
.ymr-value { font-weight: 600; text-align: right; }

/* Status badges */
.yatoon-status-pending    { color: #d97706; }
.yatoon-status-confirmed  { color: #059669; }
.yatoon-status-completed  { color: #6b7280; }
.yatoon-status-cancelled,
.yatoon-status-cancelled_by_customer { color: #dc2626; }

.yatoon-manage-actions {
    padding: 24px 28px 4px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.yatoon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .15s;
    text-decoration: none;
}
.yatoon-btn:disabled { opacity: .6; cursor: not-allowed; }

.yatoon-btn-primary {
    background: var(--yatoon-primary);
    color: #fff;
    border-color: var(--yatoon-primary);
}
.yatoon-btn-primary:hover:not(:disabled) {
    filter: brightness(1.1);
}
.yatoon-btn-outline {
    background: transparent;
    color: var(--yatoon-primary);
    border-color: var(--yatoon-primary);
}
.yatoon-btn-outline:hover:not(:disabled) {
    background: var(--yatoon-primary-light);
}
.yatoon-btn-ghost {
    background: transparent;
    color: var(--yatoon-muted);
    border-color: var(--yatoon-border);
}
.yatoon-btn-ghost:hover:not(:disabled) { background: #f9fafb; }
.yatoon-btn-sm { padding: 7px 14px; font-size: 13px; }

/* Reschedule panel */
.yatoon-reschedule-panel {
    padding: 20px 28px;
    border-top: 1px solid var(--yatoon-border);
    background: #fafafa;
}
.yatoon-reschedule-panel h3 {
    margin: 0 0 16px;
    font-size: 15px;
    color: var(--yatoon-text);
}
.yatoon-reschedule-date-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.yatoon-reschedule-date-row label {
    font-size: 13px;
    color: var(--yatoon-muted);
    font-weight: 600;
}
.yatoon-reschedule-date-row input[type="date"] {
    border: 1.5px solid var(--yatoon-border);
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 14px;
    outline: none;
}
.yatoon-reschedule-date-row input[type="date"]:focus {
    border-color: var(--yatoon-primary);
}

/* Slot chips */
.yatoon-slots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.yatoon-slot-chip {
    padding: 8px 14px;
    border: 1.5px solid var(--yatoon-border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    color: var(--yatoon-text);
}
.yatoon-slot-chip:hover {
    border-color: var(--yatoon-primary);
    color: var(--yatoon-primary);
}
.yatoon-slot-chip.selected {
    background: var(--yatoon-primary);
    border-color: var(--yatoon-primary);
    color: #fff;
}

.yatoon-reschedule-confirm-row {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.yatoon-change-services-help {
    margin: -4px 0 14px;
    color: var(--yatoon-muted);
    font-size: 13px;
    line-height: 1.45;
}

.yatoon-service-change-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.yatoon-service-change-row label {
    color: var(--yatoon-muted);
    font-size: 13px;
    font-weight: 700;
}

.yatoon-service-change-select,
.yatoon-service-change-staff {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--yatoon-border);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    color: var(--yatoon-text);
    font-size: 14px;
}

.yatoon-service-change-staff-note {
    grid-column: 2;
    margin-top: -4px;
    color: var(--yatoon-muted);
    font-size: 12px;
}

.yatoon-service-remove-row {
    grid-column: 2;
    min-height: 38px;
    border: 1px solid var(--yatoon-border);
    border-radius: 999px;
    background: #fff;
    color: #dc2626;
    font-weight: 700;
    cursor: pointer;
    padding: 7px 12px;
}

/* Notice boxes */
.yatoon-manage-notice {
    margin: 16px 28px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}
.yatoon-notice-success { background: #d1fae5; color: #065f46; }
.yatoon-notice-error   { background: #fee2e2; color: #991b1b; }
.yatoon-notice-warning { background: #fef3c7; color: #92400e; }
.yatoon-notice-info    { background: #eff6ff; color: #1e40af; }
.yatoon-manage-error   { background: #fee2e2; color: #991b1b; padding: 14px 18px; border-radius: 8px; }

.yatoon-manage-footer {
    padding: 16px 28px;
    text-align: center;
    font-size: 13px;
    color: var(--yatoon-muted);
    border-top: 1px solid var(--yatoon-border);
}
.yatoon-manage-footer a { color: var(--yatoon-primary); text-decoration: none; }

.yatoon-after-cancel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 28px 18px;
}
.yatoon-after-cancel-actions .yatoon-btn {
    flex: 1 1 180px;
    justify-content: center;
}

@media (max-width: 480px) {
    .yatoon-manage-wrap { padding: 12px 8px 32px; }
    .yatoon-manage-header,
    .yatoon-manage-details,
    .yatoon-manage-actions,
    .yatoon-reschedule-panel,
    .yatoon-manage-notice { padding-left: 18px; padding-right: 18px; }
    .yatoon-manage-actions { flex-direction: column; }
    .yatoon-after-cancel-actions { padding-left: 18px; padding-right: 18px; flex-direction: column; }
    .yatoon-btn { justify-content: center; }
    .yatoon-service-change-row { grid-template-columns: 1fr; }
    .yatoon-service-change-staff-note,
    .yatoon-service-remove-row { grid-column: 1; }
}

.yatoon-manage-footer .yatoon-manage-return {
  display: inline-flex;
  color: var(--yatoon-text);
  text-decoration: none;
}

.yatoon-manage-footer .yatoon-manage-return:hover {
  text-decoration: none;
}

/* ============================================================
   4.8.7 UI Polish: self-service booking management
   ============================================================ */
.yatoon-manage-wrap {
    --yatoon-border: #e5e7eb;
    --yatoon-text: #111827;
    --yatoon-muted: #6b7280;
    --yatoon-radius: 16px;
}

.yatoon-manage-card {
    box-shadow: 0 14px 36px rgba(15, 23, 42, .08);
}

.yatoon-manage-header {
    background: #111827;
}

.yatoon-manage-header h2 {
    letter-spacing: 0;
}

.yatoon-manage-row {
    align-items: flex-start;
    gap: 16px;
}

.ymr-label {
    letter-spacing: 0;
    text-transform: none;
}

.ymr-value {
    color: #111827;
}

.yatoon-btn {
    border-width: 1px;
    border-radius: 999px;
    min-height: 42px;
}

.yatoon-btn-primary {
    box-shadow: 0 10px 22px rgba(236, 72, 153, .16);
}

.yatoon-btn-outline,
.yatoon-btn-ghost {
    background: #fff;
}

.yatoon-reschedule-panel {
    background: #f8fafc;
}

.yatoon-reschedule-date-row input[type="date"] {
    border-width: 1px;
    border-radius: 10px;
    min-height: 40px;
}

.yatoon-reschedule-date-row input[type="date"]:focus {
    box-shadow: 0 0 0 3px rgba(236, 72, 153, .12);
}

.yatoon-slot-chip {
    border-width: 1px;
    border-radius: 999px;
}

.yatoon-manage-notice {
    border-radius: 12px;
}


/* ═══════════════════════════════════════════════════════════════════
   YATOON APPLE-STYLE - Manage Booking Refresh
   ═══════════════════════════════════════════════════════════════════ */

.yatoon-manage-wrap {
  --yatoon-primary:       #ec4899;
  --yatoon-primary-light: rgba(236,72,153,.10);
  --yatoon-text:          #111827;
  --yatoon-muted:         #6b7280;
  --yatoon-border:        rgba(0,0,0,.08);
  --yatoon-surface:       #ffffff;
  --yatoon-surface2:      #f8fafc;
  --yatoon-radius:        20px;
  --yatoon-ease:          cubic-bezier(.4,0,.2,1);
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
}

/* Outer card */
.yatoon-manage-card {
  background: var(--yatoon-surface);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--yatoon-radius);
  box-shadow: 0 16px 48px rgba(15,23,42,.11), 0 1px 0 rgba(255,255,255,.9) inset;
  overflow: hidden;
}

/* Header */
.yatoon-manage-header {
  background: #111827;
  padding: 28px 30px 22px;
}

.yatoon-manage-header h2 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #fff;
  border: none;
  margin: 0 0 4px;
}

.yatoon-manage-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  margin: 0;
}

/* Details */
.yatoon-manage-details {
  padding: 22px 30px;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.yatoon-manage-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,.05);
  font-size: 14px;
  transition: background .15s;
}

.yatoon-manage-row:last-child { border-bottom: none; }

.ymr-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--yatoon-muted);
  letter-spacing: 0;
  text-transform: none;
  flex: 0 0 100px;
}

.ymr-value {
  font-weight: 600;
  color: var(--yatoon-text);
  text-align: right;
}

/* Actions */
.yatoon-manage-actions {
  padding: 22px 30px 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Buttons */
.yatoon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  min-height: 44px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .18s var(--yatoon-ease);
  text-decoration: none;
}

.yatoon-btn:hover { transform: translateY(-1px); }
.yatoon-btn:active { transform: scale(.97); }
.yatoon-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.yatoon-btn-primary {
  background: var(--yatoon-primary);
  color: #fff;
  border-color: var(--yatoon-primary);
  box-shadow: 0 6px 18px rgba(236,72,153,.25);
}

.yatoon-btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 10px 26px rgba(236,72,153,.32);
}

.yatoon-btn-outline {
  background: var(--yatoon-surface);
  color: var(--yatoon-primary);
  border-color: rgba(236,72,153,.30);
}

.yatoon-btn-outline:hover:not(:disabled) {
  background: var(--yatoon-primary-light);
  border-color: var(--yatoon-primary);
}

.yatoon-btn-ghost {
  background: var(--yatoon-surface);
  color: var(--yatoon-muted);
  border-color: rgba(0,0,0,.12);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.yatoon-btn-ghost:hover:not(:disabled) {
  background: var(--yatoon-surface2);
  color: var(--yatoon-text);
}

.yatoon-btn-sm { min-height: 36px; padding: 7px 16px; font-size: 13px; }

/* Reschedule panel */
.yatoon-reschedule-panel {
  padding: 22px 30px;
  border-top: 1px solid rgba(0,0,0,.07);
  background: var(--yatoon-surface2);
}

.yatoon-reschedule-panel h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--yatoon-text);
  margin: 0 0 16px;
}

.yatoon-reschedule-date-row input[type="date"] {
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 10px;
  min-height: 42px;
  background: var(--yatoon-surface);
  font-size: 14px;
  transition: border-color .18s, box-shadow .18s;
}

.yatoon-reschedule-date-row input[type="date"]:focus {
  border-color: var(--yatoon-primary);
  box-shadow: 0 0 0 4px rgba(236,72,153,.12);
  outline: none;
}

/* Slot chips */
.yatoon-slot-chip {
  padding: 9px 16px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--yatoon-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: all .15s var(--yatoon-ease);
  color: var(--yatoon-text);
}

.yatoon-slot-chip:hover {
  border-color: var(--yatoon-primary);
  color: var(--yatoon-primary);
  box-shadow: 0 3px 10px rgba(236,72,153,.15);
  transform: translateY(-1px);
}

.yatoon-slot-chip.selected {
  background: var(--yatoon-primary);
  border-color: var(--yatoon-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(236,72,153,.28);
}

/* Notice boxes */
.yatoon-manage-notice {
  margin: 14px 30px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.yatoon-notice-success { background: #dcfce7; color: #15803d; border-left: 3px solid #22c55e; }
.yatoon-notice-error   { background: #fee2e2; color: #991b1b; border-left: 3px solid #ef4444; }
.yatoon-notice-warning { background: #fef9c3; color: #a16207; border-left: 3px solid #f59e0b; }
.yatoon-notice-info    { background: #eff6ff; color: #1d4ed8; border-left: 3px solid #3b82f6; }

/* Footer */
.yatoon-manage-footer {
  padding: 16px 30px;
  border-top: 1px solid rgba(0,0,0,.06);
  background: var(--yatoon-surface2);
  font-size: 13px;
  color: var(--yatoon-muted);
}

.yatoon-manage-footer a {
  color: var(--yatoon-primary);
  font-weight: 600;
  text-decoration: none;
}

.yatoon-manage-footer a:hover { text-decoration: underline; }

/* Status colours */
.yatoon-status-pending    { color: #d97706; font-weight: 700; }
.yatoon-status-confirmed  { color: #059669; font-weight: 700; }
.yatoon-status-completed  { color: #6b7280; font-weight: 700; }
.yatoon-status-cancelled,
.yatoon-status-cancelled_by_customer { color: #dc2626; font-weight: 700; }

.yatoon-cancel-choice {
  display: inline-flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: flex-end;
  cursor: pointer;
}

.yatoon-cancel-choice input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.yatoon-cancel-choice span {
  display: block;
}

@media (max-width: 480px) {
  .yatoon-manage-wrap { padding: 10px 6px 28px; }
  .yatoon-manage-header,
  .yatoon-manage-details,
  .yatoon-manage-actions,
  .yatoon-reschedule-panel,
  .yatoon-manage-notice,
  .yatoon-manage-footer { padding-left: 18px; padding-right: 18px; }
  .yatoon-manage-actions { flex-direction: column; }
  .yatoon-btn { justify-content: center; }
}

/* Keep post-cancel actions compact on mobile themes with large global buttons. */
#yatoon-after-cancel-actions.yatoon-after-cancel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 30px 18px;
}

#yatoon-after-cancel-actions.yatoon-after-cancel-actions .yatoon-btn {
  flex: 1 1 180px;
  min-height: 44px;
  height: auto;
  max-height: 48px;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.2;
  box-shadow: none;
}

.yatoon-manage-wrap :where(button,a,input,select,textarea):focus-visible,
#yatoon-manage-overlay :where(button,a,input,select,textarea,[tabindex]):focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .yatoon-manage-wrap *,
  #yatoon-manage-overlay * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 480px) {
  #yatoon-after-cancel-actions.yatoon-after-cancel-actions {
    flex-direction: column;
    padding-left: 18px;
    padding-right: 18px;
  }

  #yatoon-after-cancel-actions.yatoon-after-cancel-actions .yatoon-btn {
    width: 100%;
    flex: 0 0 auto;
  }
}
