/* admin/assets/admin.css — shared styling for the admin panel pages.
   Dedicated class names (not .btn/.btn-outline) are used where Bootstrap utility
   classes would otherwise collide with the site-wide .btn/.btn-outline rules in
   the public assets/style.css (that file overrides any element carrying those
   class names, regardless of Bootstrap modifier classes). */

.phone-cell{ display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.phone-cell .phone-link{ white-space: nowrap; }
.whatsapp-chip{
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: #25D366; color: #fff; text-decoration: none;
}
.whatsapp-chip:hover{ background: #1ebe5b; }
.whatsapp-chip svg{ fill: #fff; }

/* Desktop appointments table — fixed layout with per-column widths so it fits
   the page width instead of relying on horizontal scroll; long free-text
   fields (email, product interest) truncate with an ellipsis + title tooltip. */
.appointments-table{ table-layout: fixed; font-size: 0.9rem; }
/* Tighter cell padding than Bootstrap's default (0.5rem) to reclaim horizontal room. */
.appointments-table th, .appointments-table td{ padding: 0.4rem 0.4rem; vertical-align: middle; }
/* Headers and the two date columns must never wrap onto a second line. */
.appointments-table th{ white-space: nowrap; }
.appointments-table .nowrap{ white-space: nowrap; }
/* Note: overflow is deliberately NOT hidden at the th/td level — that would
   also clip the action icon buttons below, which don't use .truncate. */
.truncate{ display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.action-icons{ display: flex; gap: 4px; flex-wrap: nowrap; }
.action-icon-btn{
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: var(--brand, #007ae7); color: #fff; text-decoration: none;
}
.action-icon-btn:hover{ opacity: 0.85; color: #fff; }
.action-icon-btn.outline{
  background: transparent; color: var(--brand, #007ae7);
  border: 1px solid var(--brand, #007ae7);
}
.action-icon-btn.outline:hover{ background: rgba(0,122,231,0.08); color: var(--brand, #007ae7); }
.action-icon-btn svg{ fill: currentColor; }

/* Read-only details view (view_appointment.php) — label/value rows that
   stack on mobile and sit side by side on wider screens. */
.detail-list{ margin: 0; }
.detail-row{
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 0; border-bottom: 1px solid rgba(2, 76, 147, 0.08);
}
.detail-row dt{ color: var(--muted, #6b7280); font-size: 13px; font-weight: 600; }
.detail-row dd{ margin: 0; word-break: break-word; }
@media (min-width: 576px){
  .detail-row{ flex-direction: row; align-items: baseline; }
  .detail-row dt{ flex: 0 0 200px; }
  .detail-row dd{ flex: 1; }
}

/* Mobile card list (shown instead of the table below the md breakpoint) */
.appointment-card{
  border: 1px solid rgba(2, 76, 147, 0.1);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fbfdff;
}
.appointment-card-header{
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(2, 76, 147, 0.08);
}
.appointment-card-name{ font-weight: 700; }
.appointment-card-date{
  background: var(--brand, #007ae7); color: #fff; border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.appointment-card-body{ display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.appointment-card-body .label{ color: var(--muted, #6b7280); font-size: 12px; display: block; }
.appointment-card .btn{ margin-top: 0; }

/* Admin section tabs (Lista spotkań / Kalendarz) */
.admin-tabs{ display: flex; gap: 4px; padding: 10px 0 0; }
.admin-tabs a{
  display: inline-block; padding: 8px 14px; border-radius: 8px 8px 0 0;
  text-decoration: none; color: var(--muted, #6b7280); font-weight: 600; font-size: 14px;
}
.admin-tabs a.active{ color: var(--brand, #007ae7); background: #fff; }

/* Month calendar grid */
.calendar-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-weekday{
  text-align: center; font-weight: 600; font-size: 12px; color: var(--muted, #6b7280);
  padding: 4px 0;
}
.calendar-cell{
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 2px;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(2, 76, 147, 0.08);
  border-radius: 8px;
  padding: 6px 2px;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.calendar-cell:hover{ background: rgba(0,122,231,0.06); }
.calendar-cell--empty{ border: none; background: transparent; }
.calendar-cell--today{ border-color: var(--brand, #007ae7); border-width: 2px; }
.calendar-cell--selected{ background: rgba(0,122,231,0.12); }
.calendar-day-num{ font-weight: 600; font-size: 14px; }
.calendar-dot{ width: 6px; height: 6px; border-radius: 50%; background: var(--brand, #007ae7); }
.calendar-count{ font-size: 11px; color: var(--brand, #007ae7); font-weight: 600; }

@media (max-width: 575px){
  .site-header .wrap{ flex-wrap: wrap; }
  .admin-title{ font-size: 16px; flex: 1 1 100%; order: 2; }
  .logo{ order: 1; }
  .user-actions{ order: 3; margin-left: 0 !important; }

  .calendar-cell{ padding: 4px 1px; }
  .calendar-day-num{ font-size: 12px; }
  .calendar-weekday{ font-size: 10px; }
}
