/* MSA Remote Client — public widget styles.
   Most styling comes from the patient theme (see medicalspaces-patient-theme/style.css
   "Practitioner cards" section). These rules cover only the booking widget
   internals which the theme doesn't know about. */

.msa-booking-widget {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    font-family: inherit;
}

.msa-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 8px;
}
.msa-step {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    min-width: 80px;
}
.msa-step.active { color: #1a3a2a; background: rgba(196,148,74,0.08); border: 1px solid #c4944a; }
.msa-step.done   { color: #6b8f71; }

.msa-step-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    color: #1a3a2a;
    margin: 0 0 16px;
}

/* Practitioner / service rows in steps 1-2 */
.msa-pract-row, .msa-svc-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: border-color 0.15s, transform 0.15s;
}
.msa-pract-row:hover, .msa-svc-row:hover {
    border-color: #6b8f71;
    transform: translateY(-1px);
}
.msa-pract-row .msa-avatar-placeholder {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, #6b8f71, #2a5a40);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px;
}
.msa-pract-info-mini, .msa-svc-info { flex: 1; }
.msa-pract-info-mini strong, .msa-svc-info strong { display: block; color: #1a3a2a; }
.msa-pract-info-mini .muted, .msa-svc-info .muted {
    color: #6b7280; font-size: 13px; margin-top: 2px;
}
.msa-svc-info p { margin: 6px 0 0; color: #4b5563; font-size: 14px; }

/* Slots grid */
.msa-week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 8px 0;
}
.msa-week-nav button {
    background: none; border: 1px solid #e5e7eb;
    padding: 6px 12px; border-radius: 6px; cursor: pointer;
    color: #1a3a2a;
}
.msa-week-nav button:hover { background: #f8f5f0; }
.msa-week-label { font-weight: 600; color: #1a3a2a; }

.msa-day-columns {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.msa-day-column { text-align: center; }
.msa-day-header {
    padding: 8px 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 8px;
}
.msa-day-header strong { display: block; color: #1a3a2a; font-size: 13px; }
.msa-day-header small { color: #6b7280; font-size: 11px; }
.msa-day-slots { display: flex; flex-direction: column; gap: 4px; }
.msa-slot-btn {
    background: #f8f5f0; border: 1px solid #e5e7eb;
    padding: 6px 4px; border-radius: 6px;
    font-size: 13px; cursor: pointer;
    color: #1a3a2a; font-family: 'JetBrains Mono', monospace;
}
.msa-slot-btn:hover { background: #1a3a2a; color: #fff; border-color: #1a3a2a; }
.msa-slot-btn.selected { background: #1a3a2a; color: #fff; border-color: #1a3a2a; }
.msa-no-slots { color: #d1d5db; font-size: 12px; padding: 8px 0; }

.msa-week-empty {
    grid-column: 1/-1;
    text-align: center; padding: 32px 16px;
    background: #f8f5f0; border-radius: 8px; margin-top: 16px;
}
.msa-week-empty p { margin: 0 0 4px; }

/* Patient form */
.msa-patient-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.msa-patient-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #4b5563; }
.msa-patient-form input, .msa-patient-form textarea {
    padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font: inherit; font-size: 15px;
}
.msa-patient-form input:focus, .msa-patient-form textarea:focus {
    outline: 0; border-color: #6b8f71;
    box-shadow: 0 0 0 3px rgba(107,143,113,0.2);
}
.msa-consent { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-size: 13px; }
.msa-consent input { flex-shrink: 0; margin-top: 2px; }
.msa-summary {
    padding: 12px 16px; background: #f8f5f0; border-left: 4px solid #c4944a;
    border-radius: 4px; color: #1a3a2a; margin-bottom: 16px;
}

/* Buttons (general) */
.msa-btn {
    padding: 10px 20px; border-radius: 8px; border: 0;
    font-weight: 600; font-size: 14px;
    background: #fff; color: #1a3a2a; border: 1px solid #1a3a2a;
    cursor: pointer; transition: all 0.15s;
}
.msa-btn:hover { background: #1a3a2a; color: #fff; }
.msa-btn-primary { background: #1a3a2a; color: #fff; }
.msa-btn-primary:hover { background: #2a5a40; }
.msa-back {
    background: none; border: 0; color: #6b7280; padding: 8px 0;
    cursor: pointer; font-size: 13px; margin-top: 12px;
}
.msa-back:hover { color: #1a3a2a; }
.msa-btn-cancel { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.msa-btn-cancel:hover { background: #b91c1c; color: #fff; }

/* States */
.msa-success {
    text-align: center; padding: 32px;
    background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px;
}
.msa-success h3 { color: #166534; }
.msa-error {
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    padding: 12px 16px; border-radius: 8px; margin-top: 14px; font-size: 14px;
}
.msa-error-box { padding: 24px; text-align: center; }
.msa-empty { color: #6b7280; padding: 16px; text-align: center; }
.msa-loading { color: #6b7280; padding: 24px; text-align: center; }

/* Lookup */
.msa-lookup-form {
    max-width: 480px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 12px;
}
.msa-lookup-form label { color: #4b5563; }
.msa-lookup-form input {
    padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit;
}
.msa-appointment-detail table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.msa-appointment-detail th, .msa-appointment-detail td {
    text-align: left; padding: 10px 12px; border-bottom: 1px solid #e5e7eb;
}
.msa-appointment-detail th { color: #6b7280; font-weight: 500; width: 30%; }
.msa-cancelled {
    padding: 16px; background: #f0fdf4; border-radius: 8px; color: #166534;
}

/* Responsive */
@media (max-width: 720px) {
    .msa-day-columns { grid-template-columns: repeat(4, 1fr); }
    .msa-day-column:nth-child(n+5) { display: none; }
    .msa-pract-row, .msa-svc-row { flex-wrap: wrap; }
}
