/* ── Dr-Ortoped AI Advisor — Frontend Widget ─────────────────────────────── */

.doa-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 680px;
  margin: 0 auto;
  color: #1a1a2e;
  line-height: 1.6;
}

/* ── Search Card ─────────────────────────────────────────────────────────── */

.doa-search-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 40px;
  box-shadow: 0 4px 32px rgba(0,80,120,.10);
  border: 1px solid #e8f0f5;
}

.doa-badge-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.doa-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #e6f4ff;
  color: #0063a5;
  font-size: .8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
}

.doa-badge-outline {
  background: transparent;
  border: 1px solid #b8d9f0;
  color: #4a8ab5;
}

.doa-badge-dot {
  width: 7px;
  height: 7px;
  background: #00b050;
  border-radius: 50%;
  animation: doa-pulse 1.8s infinite;
}

@keyframes doa-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.3); }
}

.doa-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: #0a2540;
  line-height: 1.25;
}

.doa-title em {
  font-style: normal;
  color: #0063a5;
}

.doa-subtitle {
  color: #5a7a94;
  font-size: .92rem;
  margin: 0 0 24px;
}

.doa-label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  color: #2c4a62;
  margin-bottom: 8px;
}

.doa-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #d0e4f0;
  border-radius: 12px;
  font-size: .95rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color .2s;
  box-sizing: border-box;
  color: #1a1a2e;
  background: #fafcff;
}

.doa-textarea:focus {
  outline: none;
  border-color: #0063a5;
  background: #fff;
}

/* ── Hints ───────────────────────────────────────────────────────────────── */

.doa-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 20px;
}

.doa-hint {
  background: #f0f7ff;
  border: 1px solid #c2d9f0;
  color: #0063a5;
  font-size: .8rem;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}

.doa-hint:hover {
  background: #0063a5;
  color: #fff;
  border-color: #0063a5;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.doa-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0063a5, #0085d4);
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: opacity .2s, transform .1s;
  font-family: inherit;
  margin-top: 4px;
}

.doa-btn-primary:hover   { opacity: .92; }
.doa-btn-primary:active  { transform: scale(.98); }
.doa-btn-primary:disabled{ opacity: .6; cursor: not-allowed; }

.doa-btn-secondary {
  background: transparent;
  color: #0063a5;
  border: 2px solid #c2d9f0;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  margin-top: 12px;
}

.doa-btn-secondary:hover { border-color: #0063a5; background: #f0f7ff; }

/* ── Trust Bar ───────────────────────────────────────────────────────────── */

.doa-trust-bar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eef3f8;
  font-size: .8rem;
  color: #7a9ab5;
}

.doa-trust-bar span span {
  margin-right: 4px;
}

/* ── Error ───────────────────────────────────────────────────────────────── */

.doa-error {
  color: #c0392b;
  font-size: .87rem;
  margin: 6px 0;
  min-height: 18px;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */

.doa-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: doa-spin .7s linear infinite;
}

.doa-spinner.active { display: inline-block; }

@keyframes doa-spin { to { transform: rotate(360deg); } }

/* ── AI Result Card ──────────────────────────────────────────────────────── */

.doa-result-step {
  animation: doa-fade-in .4s ease;
}

@keyframes doa-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.doa-result-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 36px;
  box-shadow: 0 4px 32px rgba(0,80,120,.10);
  border: 1px solid #e8f0f5;
}

.doa-result-badge {
  display: inline-block;
  background: #e6f9ee;
  color: #1a7d43;
  font-size: .82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.doa-doctor-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: #f4f9ff;
  border-radius: 14px;
  margin-bottom: 20px;
}

.doa-doctor-avatar-wrap {
  flex-shrink: 0;
}

.doa-doctor-photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0,80,120,.15);
}

.doa-doctor-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0063a5, #0085d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.doa-doctor-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0a2540;
  margin-bottom: 4px;
}

.doa-doctor-specialty {
  font-size: .88rem;
  color: #0063a5;
  font-weight: 600;
  margin-bottom: 4px;
}

.doa-doctor-exp {
  font-size: .8rem;
  color: #7a9ab5;
  background: #e8f2fc;
  padding: 2px 10px;
  border-radius: 10px;
  display: inline-block;
}

.doa-explanation {
  margin-bottom: 16px;
}

.doa-explanation h4 {
  font-size: .9rem;
  color: #0063a5;
  margin: 0 0 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.doa-explanation p {
  font-size: .92rem;
  color: #3a5a74;
  margin: 0;
}

.doa-additional {
  background: #f8fbff;
  border-left: 3px solid #b8d9f0;
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  font-size: .88rem;
  color: #5a7a94;
  margin-bottom: 20px;
}

.doa-additional p { margin: 0; }

.doa-result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.doa-btn-profile {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  background: #f0f7ff;
  color: #0063a5;
  border: 2px solid #c2d9f0;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}

.doa-btn-profile:hover { background: #0063a5; color: #fff; border-color: #0063a5; }

.doa-btn-book {
  flex: 1;
  min-width: 200px;
  background: linear-gradient(135deg, #0063a5, #0085d4);
  color: #fff;
  border: none;
  padding: 13px 24px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .2s;
}

.doa-btn-book:hover { opacity: .9; }

/* ── Success ─────────────────────────────────────────────────────────────── */

.doa-success-step {
  text-align: center;
  padding: 48px 40px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 32px rgba(0,80,120,.10);
  border: 1px solid #e8f0f5;
  animation: doa-fade-in .4s ease;
}

.doa-success-icon { font-size: 3rem; margin-bottom: 16px; }
.doa-success-step h2 { font-size: 1.5rem; color: #0a2540; margin: 0 0 10px; }
.doa-success-step p { color: #5a7a94; font-size: .95rem; margin: 0 0 8px; }

.doa-success-info {
  display: inline-block;
  background: #e6f9ee;
  color: #1a7d43;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  margin: 16px 0;
}

/* ── Modal ───────────────────────────────────────────────────────────────── */

.doa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,37,64,.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
  animation: doa-fade-in .2s ease;
}

.doa-modal {
  background: #fff;
  border-radius: 20px;
  padding: 36px 40px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.doa-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color .15s;
}

.doa-modal-close:hover { color: #333; }

.doa-modal-doctor-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #f4f9ff;
  border-radius: 12px;
  margin-bottom: 20px;
}

.doa-modal-doc-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #0063a5, #0085d4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.doa-modal-doc-spec {
  font-size: .8rem;
  color: #0063a5;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.doa-modal-doc-name {
  font-size: 1rem;
  font-weight: 700;
  color: #0a2540;
}

.doa-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0a2540;
  margin: 0 0 6px;
}

.doa-modal-sub {
  color: #7a9ab5;
  font-size: .88rem;
  margin: 0 0 20px;
}

.doa-field {
  margin-bottom: 16px;
}

.doa-field label {
  display: block;
  font-weight: 600;
  font-size: .87rem;
  color: #2c4a62;
  margin-bottom: 6px;
}

.doa-field input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #d0e4f0;
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .2s;
  box-sizing: border-box;
  color: #1a1a2e;
}

.doa-field input:focus {
  outline: none;
  border-color: #0063a5;
}

.doa-modal-error {
  color: #c0392b;
  font-size: .87rem;
  margin: 0 0 10px;
  min-height: 18px;
}

.doa-modal-note {
  text-align: center;
  color: #a0b8cc;
  font-size: .8rem;
  margin: 10px 0 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 520px) {
  .doa-search-card,
  .doa-result-card,
  .doa-success-step,
  .doa-modal { padding: 24px 20px; }

  .doa-title { font-size: 1.35rem; }
  .doa-result-actions { flex-direction: column; }
  .doa-btn-profile { justify-content: center; }
  .doa-trust-bar { gap: 12px; font-size: .75rem; }
}
