/* --- Action buttons and modern CTA styles --- */

:root {
  --btn-radius: 0.85rem;
  --btn-shadow: 0 10px 18px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
}

.btn,
.btn:link,
.btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--btn-radius);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--btn-shadow);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 10px 18px rgba(76, 29, 149, 0.18);
}

.btn-secondary {
  background: #e2e8f0;
  color: #1f2937;
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 10px 18px rgba(16, 185, 129, 0.22);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #f87171);
  color: #fff;
  box-shadow: 0 10px 18px rgba(220, 38, 38, 0.22);
}

.btn-outline-primary {
  border: 1.5px solid rgba(99, 102, 241, 0.65);
  color: #4338ca;
  background: rgba(224, 231, 255, 0.45);
}

.btn-outline-secondary {
  border: 1.5px solid rgba(148, 163, 184, 0.7);
  color: #475569;
  background: rgba(241, 245, 249, 0.8);
}

.btn-sm {
  min-height: 2.1rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
}

.btn + .btn {
  margin-left: 0.4rem;
}

.action-link,
.action-link:link,
.action-link:visited,
.action-btn,
.action-btn:link,
.action-btn:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.70rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #1f2937;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.action-link svg,
.action-btn svg {
  width: 0.95rem;
  height: 0.95rem;
}

.action-link:hover,
.action-btn:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 8px 14px rgba(30, 41, 59, 0.12);
}

.action-link:active,
.action-btn:active {
  transform: translateY(0);
}

.action-link--view,
.action-btn--view {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.action-link--edit,
.action-btn--edit {
  background: rgba(76, 29, 149, 0.12);
  color: #5b21b6;
}

.action-link--delete,
.action-btn--delete {
  background: rgba(248, 113, 113, 0.14);
  color: #b91c1c;
}

.action-link--print,
.action-btn--print {
  background: rgba(45, 212, 191, 0.18);
  color: #0f766e;
}

.action-link--neutral,
.action-btn--neutral {
  background: rgba(148, 163, 184, 0.2);
  color: #334155;
}

.action-link--outline,
.action-btn--outline {
  background: transparent;
  color: #4c1d95;
  border: 1.5px solid rgba(79, 70, 229, 0.5);
}

.action-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.action-badge--success {
  background: rgba(16, 185, 129, 0.16);
  color: #059669;
}

.action-badge--danger {
  background: rgba(239, 68, 68, 0.16);
  color: #dc2626;
}

.action-badge--info {
  background: rgba(59, 130, 246, 0.14);
  color: #2563eb;
}

/* Ensure inline forms containing action buttons align nicely */
form.inline,
.inline-form {
  display: inline-flex;
}

form.inline .action-link,
form.inline .action-btn,
.inline-form .action-link,
.inline-form .action-btn {
  margin-left: 0.2rem;
}

button.action-link,
button.action-btn {
  border: none;
  background-clip: padding-box;
  cursor: pointer;
}

button.action-link:focus-visible,
button.action-btn:focus-visible,
.btn:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.4);
  outline-offset: 2px;
}

summary.action-btn,
summary.btn {
  list-style: none;
}

summary.action-btn::-webkit-details-marker,
summary.btn::-webkit-details-marker {
  display: none;
}

/* Transitional styling for legacy Tailwind link classes */
a.text-blue-600.underline,
a.text-blue-600.underline.text-sm,
a.text-blue-600.underline:hover,
a.text-blue-700.underline,
a.text-blue-700.underline:hover {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.70rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

a.text-blue-600.underline:hover,
a.text-blue-700.underline:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 8px 14px rgba(30, 64, 175, 0.18);
}

a.text-slate-700.underline,
a.text-slate-700.underline:hover {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.70rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.2);
  color: #334155;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

a.text-slate-700.underline:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 8px 14px rgba(51, 65, 85, 0.18);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0.8rem;
  border: 1.5px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.18s ease;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.16);
}
.btn:active {
  transform: translateY(0);
  filter: brightness(0.96);
}
.btn:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.35);
  outline-offset: 3px;
}
.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn--primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.25);
}
.btn--secondary {
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}
.btn--outline {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(255, 255, 255, 0.88);
  color: #312e81;
}
.btn--ghost {
  border-color: transparent;
  background: rgba(99, 102, 241, 0.08);
  color: #312e81;
}
.btn--danger {
  background: linear-gradient(135deg, #dc2626, #f87171);
  color: #fff;
  box-shadow: 0 14px 26px rgba(220, 38, 38, 0.25);
}
.btn--text {
  background: transparent;
  border: none;
  color: #1d4ed8;
  box-shadow: none;
  padding: 0.35rem 0.55rem;
}
.btn--text:hover {
  background: rgba(59, 130, 246, 0.12);
  box-shadow: none;
  transform: none;
}
.btn--sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
}
.btn--xs {
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem;
}
.btn svg {
  width: 1.05rem;
  height: 1.05rem;
}
.btn--sm svg,
.btn--xs svg {
  width: 0.95rem;
  height: 0.95rem;
}
.agenda-slot {
  width: 100%;
  font-size: 0.85rem;
  line-height: 1.25;
}
.agenda-slot-highlightable {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.agenda-slot-highlightable:hover {
  box-shadow: 0 15px 25px rgba(15, 23, 42, 0.18);
  border-color: rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}
.tele-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.agenda-slot .name,
.agenda-slot .patient-name {
  font-weight: 600;
  font-size: 0.92em;
}
.agenda-slot .meta,
.agenda-slot .badge {
  font-size: 0.68em;
}
.autocomplete-hit,
#paciente-suggestions,
#paciente-suggestions button {
  border-radius: 0 !important;
}

body.modal-open {
  overflow: hidden;
}

.tele-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 120;
}
.tele-modal.is-visible {
  display: flex;
}
.tele-modal__dialog {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
  padding: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
}
.tele-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 1rem;
}
.tele-modal__close {
  border: none;
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
  font-size: 1.5rem;
  line-height: 1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  cursor: pointer;
}
.tele-modal__body {
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.tele-modal__summary {
  background: #f8fafc;
  border-radius: 1rem;
  padding: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.tele-modal__summary .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}
.tele-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}
.tele-modal [data-provider-hint] {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Teleconsulta dashboard */
.tele-wrapper {
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.tele-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.tele-summary-card {
  border-radius: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.85));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tele-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
}
.tele-summary-card[data-status="pending"] {
  border-color: rgba(249, 115, 22, 0.35);
}
.tele-summary-card[data-status="active"] {
  border-color: rgba(59, 130, 246, 0.4);
}
.tele-summary-card[data-status="completed"] {
  border-color: rgba(16, 185, 129, 0.35);
}
.tele-summary-card[data-status="cancelled"],
.tele-summary-card[data-status="cancelled_by_doctor"],
.tele-summary-card[data-status="cancelled_by_patient"] {
  border-color: rgba(248, 113, 113, 0.4);
}
.tele-summary-card--total {
  border-color: rgba(79, 70, 229, 0.35);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.9), rgba(224, 231, 255, 0.85));
}

.tele-filter-form select,
.tele-filter-form input[type="date"],
.tele-filter-form input[type="text"] {
  border-width: 1.5px;
  border-color: rgba(148, 163, 184, 0.6);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tele-filter-form select:focus,
.tele-filter-form input[type="date"]:focus,
.tele-filter-form input[type="text"]:focus {
  border-color: rgba(79, 70, 229, 0.6);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  outline: none;
}

.tele-table table {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.6);
}
.tele-table thead {
  background: rgba(248, 250, 252, 0.95);
}
.tele-table tbody tr {
  transition: background-color 0.18s ease;
}
.tele-table tbody tr:hover {
  background: rgba(243, 244, 246, 0.55);
}
.tele-table td {
  vertical-align: top;
}
