html {
  font-size: 16px;
}

/* =========================
   Clinician Lookup - Mobile Fix
   Prevent iOS zoom on input focus
   ========================= */

@media (max-width: 768px) {

    input,
    select,
    textarea,
    .form-control {
        font-size: 16px !important;
    }

    .lookup-form .form-control {
        min-height: 48px;
        padding: 12px;
    }

    .lookup-form .btn {
        min-height: 48px;
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  line-height: 1.5;
  color: #222;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Nylas Connection Status Indicators - soft-tint pill badges, shared by the
   Clinicians list and the Clinician Details page so both look and read the
   same way. Same soft-tint pill language as .status-badge below. */
.nylas-status-connected,
.nylas-status-disconnected,
.nylas-status-pending,
.nylas-status-not-connected,
.nylas-status-needs-attention {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.3;
  cursor: default;
  white-space: nowrap;
}

.nylas-status-connected {
  background-color: #e6f4ea;
  color: #1e7a34;
}

.nylas-status-disconnected {
  background-color: #fbe7e9;
  color: #b3212f;
}

.nylas-status-pending {
  background-color: #fdf3e0;
  color: #92660a;
}

.nylas-status-not-connected {
  background-color: #eceef0;
  color: #565e64;
}

.nylas-status-needs-attention {
  background-color: #fdece0;
  color: #b45a09;
}

/* Slightly smaller when inline with a heading on detail pages */
h4 .nylas-status-connected,
h4 .nylas-status-disconnected,
h4 .nylas-status-pending,
h4 .nylas-status-not-connected,
h4 .nylas-status-needs-attention {
  font-size: 0.78rem;
  vertical-align: middle;
}

/* General-purpose status pill (Active / On Leave / Inactive, etc.) - same
   visual language as the Nylas pills above, for a consistent look across
   every status column instead of one-off inline styles per badge. */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.3;
  white-space: nowrap;
}

.status-badge-active {
  background-color: #e6f4ea;
  color: #1e7a34;
}

.status-badge-leave {
  background-color: #fdf3e0;
  color: #92660a;
}

.status-badge-inactive {
  background-color: #eceef0;
  color: #565e64;
}

/* Calendar status legend on the Clinicians list */
.calendar-status-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.5rem;
  background-color: #FDFBF7;
  border: 1px solid #E7E5E4;
  border-radius: 0.6rem;
  font-size: 0.85em;
}

.calendar-status-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.calendar-status-legend .legend-count {
  font-weight: 700;
  margin-right: 0.15rem;
}

/* Darken muted and helper text for readability */
small,
.form-text,
.text-muted {
  color: #555 !important;
}

/* Stack emergency block and footer on mobile */
@media (max-width: 768px) {
    .emergency-block,
    footer {
        display: block !important;
        width: 100% !important;
    }

    .emergency-block {
        margin-bottom: 20px;
        padding: 0 15px;
    }
}

body {
    padding-top: 100px; /* Adjust based on your header height */
    padding-bottom: 100px; /* Adjust based on your footer height */
}


/* =========================
   Magellan XML Preview Page
   ========================= */

/* Let Bootstrap handle layout � do NOT override row flex */
.xml-preview-container {
    min-height: 75vh;
}

/* Left steps rail (Legal Items style) */
.xml-preview-steps {
    width: 240px; /* fixed legal-style sidebar */
    flex-shrink: 0;
    border-right: 1px solid #e5e5e5;
    padding-right: 1rem;
}

    .xml-preview-steps h6 {
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #6c757d;
        margin: 0 0 1rem 0; /* normalize heading */
    }

    .xml-preview-steps ul {
        list-style: none;
        padding-left: 0;
        margin-bottom: 1.5rem;
    }

    .xml-preview-steps li {
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }

/* Step states */
.xml-step-complete {
    color: #198754; /* Bootstrap success */
    font-weight: 600;
}

.xml-step-pending {
    color: #6c757d;
}

/* Right document pane */
.xml-preview-document {
    padding-left: 2.5rem;
}

    .xml-preview-document h4 {
        margin: 0 0 1rem 0; /* align with Steps header */
        font-weight: 500;
    }

/* XML content */
.xml-preview {
    max-height: 75vh;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 1rem;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 13px;
    white-space: pre-wrap;
}

/* Button spacing */
.steps-actions {
    margin-top: 1rem;
}

