/* ============================================
   DentalPlanner — Utility & Component Classes
   Gerado para remover style="" inline (CSP)
   ============================================ */

/* --- Display & flex utilities --- */
.u-hidden        { display: none; }
.u-flex-1        { flex: 1; }
.u-inline-middle { display: inline; vertical-align: middle; }
.u-flex-gap-2    { display: flex; gap: 8px; }
.u-flex-center-gap-2 { display: flex; gap: 8px; align-items: center; }
.u-flex-center-gap   { display: flex; align-items: center; gap: 6px; }
.u-flex-col-gap  { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.u-flex-1-p      { flex: 1; padding: 10px; }
.u-justify-center { justify-content: center; }

/* --- Spacing utilities --- */
.u-mb-4   { margin-bottom: 16px; }
.u-mb-3   { margin-bottom: 12px; }
.u-mb-10  { margin-bottom: 10px; }
.u-mb-5   { margin-bottom: 20px; }
.u-mt-1   { margin-top: 4px; }
.u-mt-3px { margin-top: 3px; }
.u-mt-3   { margin-top: 12px; }
.u-p-6    { padding: 24px; }

/* --- Text alignment --- */
.u-text-right  { text-align: right; }
.u-text-center { text-align: center; }

/* --- Font weight --- */
.u-fw-300 { font-weight: 300; }
.u-fw-500 { font-weight: 500; }
.u-fw-700 { font-weight: 700; }

/* --- Font family --- */
.u-font-base { font-family: var(--font); }

/* --- Cursor --- */
.u-cursor-pointer { cursor: pointer; }

/* --- Icon box --- */
.dp-icon-box { width: 36px; height: 38px; }

/* ============================================
   Typography components
   ============================================ */
.text-caption       { font-size: 12px; color: var(--text-3); }
.text-caption-sm    { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.text-caption-block { font-size: 12px; color: var(--text-3); margin-top: 4px; display: block; }
.text-hint          { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.text-secondary     { color: var(--text-2); }
.text-subtle        { color: var(--text-3); }
.text-danger        { color: var(--red); }
.text-accent        { color: var(--accent); }
.text-navy          { color: var(--navy); } /* --navy definido apenas nos bases da calculadora */
.text-body-muted    { font-size: 14px; color: var(--text-2); }
.text-sm-muted      { font-size: 13px; color: var(--text-3); }
.text-heading       { font-size: 16px; font-weight: 600; color: var(--text-1); }
.text-heading-lg    { font-size: 17px; font-weight: 600; color: var(--text-1); }
.text-heading-lg-mb { font-size: 17px; font-weight: 600; color: var(--text-1); margin-bottom: 8px; }
.text-label         { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
.text-body-medium   { font-size: 14px; font-weight: 500; }
.text-md-medium     { font-size: 15px; font-weight: 500; }
.text-item          { font-size: 13px; font-weight: 500; color: var(--text-1); }
.text-tiny-muted    { font-size: 9px; color: var(--text-3); }
.text-name          { font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.text-secondary-sm  { font-size: 12.5px; color: var(--text-2); }
.text-xs-medium     { font-size: 11px; font-weight: 500; }
.text-desc          { color: var(--text-2); font-size: 13.5px; margin-bottom: 20px; }
.text-desc-sm       { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }

/* ============================================
   Design-system components (dp-*)
   ============================================ */

/* Table header */
.dp-th-label {
  text-align: right; padding: 6px 8px;
  color: var(--text-3); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
}

/* Cards / list items */
.dp-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; margin-bottom: 12px;
}
.dp-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
}
.dp-section-divider { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Avatars / icons */
.dp-avatar-sm {
  width: 26px; height: 26px; min-width: 26px;
  background: var(--accent-light); color: var(--accent-dark);
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.dp-icon-danger {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--red-light, #FEE2E2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Alert */
.dp-alert-danger {
  background: var(--red-light, #FFF0F0); border: 1px solid var(--red-border);
  border-radius: 8px; padding: 10px 14px;
  font-size: 13px; color: var(--red); margin-bottom: 16px;
}

/* Dialog container */
.dp-dialog {
  background: var(--surface); border-radius: 16px;
  width: 420px; max-width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden;
}

/* Modal overlays (iniciam ocultos via u-hidden; display controlado pelo JS via style.display) */
.dp-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 600;
  align-items: center; justify-content: center; padding: 16px;
}
.dp-modal-overlay-700 {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 700;
  align-items: center; justify-content: center; padding: 16px;
}

/* Modal parts */
.dp-modal-header {
  padding: 20px 24px 16px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.dp-modal-body   { padding: 20px 24px; overflow-y: auto; flex: 1; min-height: 0; }
.dp-modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-shrink: 0; }
.dp-modal-actions { padding: 16px 24px; display: flex; gap: 8px; justify-content: flex-end; }
.dp-modal-top    { padding: 24px 24px 8px; }

/* Bottom sheet overlay (inicia oculto via u-hidden) */
.dp-sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 900;
  align-items: flex-end; justify-content: center;
}
.dp-sheet        { background: var(--surface); border-radius: 20px 20px 0 0; width: 100%; box-shadow: 0 -8px 40px rgba(0,0,0,.25); }
.dp-sheet-header { padding: 24px 20px 12px; display: flex; align-items: center; gap: 12px; }
.dp-sheet-body   { padding: 8px 20px 28px; display: flex; flex-direction: column; gap: 8px; }

/* Full-width buttons */
.dp-btn-outline {
  width: 100%; padding: 14px;
  background: var(--bg); color: var(--text-2);
  border: 1px solid var(--border); border-radius: 12px;
  font-size: 15px; font-family: inherit; cursor: pointer;
}
.dp-btn-danger {
  width: 100%; padding: 14px;
  background: var(--red, #E53E3E); color: #fff;
  border: none; border-radius: 12px;
  font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
}

/* Number input */
.dp-input-number {
  width: 100%; text-align: center;
  border: none; background: transparent;
  color: var(--text-1); font-family: var(--font); font-size: 13.5px;
  outline: none; -moz-appearance: textfield; appearance: textfield;
}

/* ============================================
   Additional text colors
   ============================================ */
.text-profit      { color: var(--accent-dark); }
.text-accent-dark { color: var(--accent-dark); }
.text-green       { color: var(--green); }

/* ============================================
   Spacing additions
   ============================================ */
.u-mb-8 { margin-bottom: 8px; }

/* ============================================
   Financial stat (large number)
   ============================================ */
.fin-stat-big { font-size: 28px; font-weight: 300; font-family: var(--mono); }

/* ============================================
   Form response row
   ============================================ */
.dp-form-row {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 16px;
  display: flex; justify-content: space-between;
  align-items: center; gap: 12px; flex-wrap: wrap;
}

/* ============================================
   Toggle switch
   ============================================ */
.dp-toggle {
  width: 40px; height: 22px; border-radius: 11px;
  position: relative; transition: background .2s; flex-shrink: 0;
}
.dp-toggle-on  { background: var(--accent); }
.dp-toggle-off { background: var(--border); }
.dp-toggle-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; position: absolute; top: 2px; transition: left .2s;
}
.dp-toggle-thumb-on  { left: 20px; }
.dp-toggle-thumb-off { left: 2px; }

/* ============================================
   Checklist step chips
   ============================================ */
.dp-step-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; text-decoration: none;
  padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border);
}
.dp-step-chip-sm {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; text-decoration: none;
  padding: 3px 8px; border-radius: 20px; border: 1px solid var(--border);
}
.dp-step-chip-done, .dp-step-chip-sm-done {
  background: var(--green-light); color: var(--green); border-color: var(--green-border);
}
.dp-step-chip-pending, .dp-step-chip-sm-pending {
  background: var(--bg); color: var(--text-2);
}

/* ============================================
   Appointment status banner (mobile detail)
   ============================================ */
.dp-status-banner {
  border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.dp-status-done      { background: var(--green-light); }
.dp-status-confirmed { background: var(--accent-light); }
.dp-status-cancelled { background: var(--border); }
.dp-status-scheduled { background: var(--blue-light); }

/* ============================================
   Flash / alert messages
   ============================================ */
.dp-flash { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.dp-flash-error   { background: var(--red-light);   color: var(--red);   border: 1px solid var(--red-border); }
.dp-flash-success { background: var(--green-light); color: var(--green); border: 1px solid var(--green-border); }
.dp-flash-info    { background: var(--blue-light);  color: var(--blue);  border: 1px solid #b8d4f7; }

/* ============================================
   Contact avatar (42px)
   ============================================ */
.dp-avatar-contact {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.dp-bg-red-light    { background: var(--red-light); }
.dp-bg-accent-light { background: var(--accent-light); }

/* ============================================
   HTMX indicator (replaces HTMX's injected style tag)
   ============================================ */
.htmx-indicator { opacity: 0; transition: opacity 200ms ease-in; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }
