/* ============================================================================
   mediweb-programarea-mea.css — pagina „Programarea mea” (29.07.2026)

   Înlocuiește blocul <style> care era scris direct în incl_programarea_mea.php.
   Numele claselor au rămas EXACT aceleași (.pm-wrap, .pm-card, .pm-form,
   .alert…), fiindcă pe ele se sprijină și HTML-ul întors prin AJAX de
   incl_programarea_mea_ok.php (pasul cu codul primit pe e-mail). Formularul,
   jetonul CSRF și reCAPTCHA nu au fost atinse.
   ============================================================================ */

body.pp-pmea { background: #f1f5f9; }

body.pp-pmea section.registration-form {
  background: transparent; box-shadow: none; border-radius: 0;
  padding: 0; width: 100%; margin: 0;
}

/* --------------------------------------------------------------- structura */
.pm-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start;
  width: min(1160px, 94vw); margin: 22px auto 10px;
}
/* codul QR stă lat, sub celelalte două, ca să nu îngusteze formularul */
.pm-qr-left { grid-column: 1 / -1; order: 3; }

.pm-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.pm-title { font-size: 1.45rem; color: #1e293b; margin: 0 0 8px; line-height: 1.25; }
.pm-card h3 { font-size: 1.1rem; color: #1e293b; margin: 0 0 14px; }
.pm-card h4 { font-size: 1rem; color: #1e293b; margin: 0 0 6px; }
.pm-muted { color: #64748b; margin: 4px 0 14px; line-height: 1.55; font-size: .93rem; }

.pm-help-list { margin: 0; padding-left: 18px; color: #475569; font-size: .9rem; line-height: 1.6; }
.pm-help-list li { margin: 8px 0; }
.pm-help-list b { color: #1e293b; }
.pm-help-list a, .pm-card a { color: #0369a1; font-weight: 600; }

/* codul QR */
.pm-qr { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pm-qr img {
  width: 168px; height: 168px; border-radius: 14px;
  border: 1px solid #e2e8f0; padding: 6px; background: #fff;
}
.pm-note { font-size: .84rem; color: #94a3b8; margin-top: 8px; line-height: 1.5; }

/* ---------------------------------------------------------------- formular */
.pm-form label {
  font-weight: 700; display: block; margin-top: 12px; color: #334155; font-size: .88rem;
}
.pm-form .info { display: block; font-size: .78rem; color: #94a3b8; margin: 4px 0 2px; }
body.pp-pmea .pm-form input[type="email"],
body.pp-pmea .pm-form input[type="text"],
body.pp-pmea .pm-form input[type="tel"],
body.pp-pmea .pm-form input[type="number"] {
  max-width: none; width: 100%; padding: 12px 14px; margin: 6px 0 0;
  border: 1px solid #cbd5e1; border-radius: 10px; font-size: 1rem; font-family: inherit;
  color: #1e293b; background: #fff;
}
body.pp-pmea .pm-form input:focus {
  outline: 2px solid #7dd3fc; outline-offset: 1px; border-color: #0ea5e9;
}
/* honeypot — rămâne ascuns */
body.pp-pmea .pm-form input[name="website"] { display: none !important; }

.pm-actions { margin-top: 18px; }
body.pp-pmea .pm-actions button,
body.pp-pmea .pm-form button[type="submit"] {
  background: #0ea5e9; color: #fff; font-weight: 700; padding: 12px 24px;
  border: 0; border-radius: 10px; cursor: pointer; font-size: .95rem; font-family: inherit;
}
body.pp-pmea .pm-actions button:hover,
body.pp-pmea .pm-form button[type="submit"]:hover { background: #0284c7; }
body.pp-pmea .pm-actions button:disabled { background: #94a3b8; cursor: default; }

details.pm-accordion { margin-top: 14px; border-top: 1px solid #f1f5f9; padding-top: 12px; }
details.pm-accordion summary {
  cursor: pointer; font-weight: 700; color: #0369a1; font-size: .89rem; margin-bottom: 6px;
}
details.pm-accordion summary:hover { text-decoration: underline; }

/* ------------------------------------------------------------ mesaje/alerte
   Aceleași clase sunt folosite și de răspunsul venit prin AJAX. */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border-radius: 10px; margin: 10px 0; font-size: .92rem; line-height: 1.45;
}
.alert svg { flex: 0 0 20px; margin-top: 1px; }
.alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.alert--error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert--info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

#pm-loading { color: #64748b; font-size: .88rem; }
#pm-result { margin-top: 14px; }

/* câmpul pentru codul primit pe e-mail (venit prin AJAX) */
#pm-result input[type="text"],
#pm-result input[inputmode="numeric"] {
  letter-spacing: .18em; font-size: 1.15rem; font-weight: 700; text-align: center;
}

@media (max-width: 860px) {
  .pm-wrap { grid-template-columns: 1fr; width: min(1160px, 100%); padding: 0 16px; }
  .pm-card { padding: 18px 16px; }
  .pm-title { font-size: 1.25rem; }
  /* pe telefon nu are rost codul QR: ești deja pe telefon */
  .pm-qr-left { display: none; }
}

/* ============================================================================
   FLUX PE PAȘI (30.07.2026) — portat din macheta aprobată
   _previews/programarea_mea_preview.html.
   Toate numele sunt prefixate cu pm-, ca să nu se bată cu regulile generice
   din styles.css (.card, .steps, .btn, .badge existau deja în alte pagini).
   ============================================================================ */

/* aranjare: pașii în stânga, întrebările frecvente + QR în dreapta */
.pm-wrap.pm-flux { grid-template-columns: 1.15fr .85fr; }
@media (max-width: 920px) { .pm-wrap.pm-flux { grid-template-columns: 1fr; } }
.pm-col { min-width: 0; }
.pm-hidden { display: none !important; }

/* indicatorul de pași */
.pm-steps { display: flex; margin: 4px 0 22px; counter-reset: pmstep; }
.pm-stp {
  flex: 1; text-align: center; position: relative; padding-top: 38px;
  font-size: .82rem; color: #94a3b8;
}
.pm-stp::before {
  counter-increment: pmstep; content: counter(pmstep);
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; color: #475569;
  font-weight: 700; display: flex; align-items: center; justify-content: center; transition: .2s;
}
.pm-stp.on::before   { background: #0ea5e9; color: #fff; }
.pm-stp.done::before { background: #16a34a; color: #fff; content: '✓'; }
.pm-stp.on { color: #0c4a6e; font-weight: 600; }
.pm-stp::after {
  content: ''; position: absolute; top: 14px; left: calc(50% + 18px);
  width: calc(100% - 36px); height: 2px; background: #e2e8f0;
}
.pm-stp.done::after { background: #16a34a; }
.pm-stp:last-child::after { display: none; }

/* bară de încărcare */
.pm-loadbar { height: 5px; background: #e6edf5; border-radius: 99px; overflow: hidden; margin: 0 0 16px; display: none; }
.pm-loadbar.on { display: block; }
.pm-loadbar i {
  display: block; height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg,#0ea5e9,#7dd3fc,#0ea5e9); background-size: 200% 100%;
  animation: pmShimmer 1.1s linear infinite; transition: width .3s cubic-bezier(.4,0,.2,1);
}
@keyframes pmShimmer { to { background-position: -200% 0; } }
body.pp-pmea .pm-sp {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  border-radius: 50%; display: inline-block; animation: pmSpin .75s linear infinite;
  vertical-align: -3px; margin-right: 8px;
}
body.pp-pmea .pm-btn-ghost .pm-sp { border-color: rgba(71,85,105,.35); border-top-color: #475569; }
@keyframes pmSpin { to { transform: rotate(360deg); } }

/* tranziția între carduri */
.pm-card.pm-leaving { opacity: 0; transform: translateY(10px) scale(.99); transition: opacity .3s ease, transform .3s ease; }
.pm-card.pm-entering { animation: pmCardIn .45s cubic-bezier(.2,.7,.3,1) both; }
@keyframes pmCardIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

/* câmpuri */
.pm-fg { margin-bottom: 14px; }
.pm-fg label { font-weight: 600; display: block; margin-bottom: 5px; color: #475569; font-size: .92rem; }
body.pp-pmea .pm-fg input {
  width: 100%; max-width: none; padding: 11px 12px; margin: 0;
  border: 1px solid #cbd5e1; border-radius: 9px; font-size: 15px; font-family: inherit;
  color: #1e293b; background: #fff; outline: none;
}
body.pp-pmea .pm-fg input:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px #bae6fd; }
body.pp-pmea .pm-fg input.bad { border-color: #ef4444; box-shadow: 0 0 0 3px #fecaca; }
.pm-fg .help { font-size: .82rem; color: #94a3b8; margin-top: 4px; }
.pm-fg .err  { font-size: .82rem; color: #dc2626; margin-top: 4px; display: none; }
.pm-fg .err.show { display: block; }

/* butoane (scop restrâns ca să bată styles.css) */
body.pp-pmea .pm-btn {
  background: #0ea5e9; color: #fff; border: 0; padding: 12px 18px; border-radius: 10px;
  font-weight: 700; cursor: pointer; width: 100%; font-size: 1rem; font-family: inherit; transition: .15s;
}
body.pp-pmea .pm-btn:hover { background: #0284c7; }
body.pp-pmea .pm-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
body.pp-pmea .pm-btn-ghost { background: #fff; color: #475569; border: 1px solid #cbd5e1; }
body.pp-pmea .pm-btn-ghost:hover { background: #f8fafc; color: #0369a1; border-color: #0ea5e9; }
body.pp-pmea .pm-btn-ghost:disabled { background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0; }
body.pp-pmea .pm-btn-small { width: auto; padding: 9px 15px; font-size: .88rem; }
.pm-btnrow { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pm-btnrow .pm-grow { flex: 1; }

.pm-tip {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 10px;
  padding: 10px 12px; font-size: .85rem; margin-top: 12px;
}
.pm-errbox {
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px;
  padding: 10px 12px; font-size: .88rem; margin-bottom: 12px; display: none;
}
.pm-errbox.show { display: block; }
.pm-errbox .alert { margin: 0; border: 0; padding: 0; background: transparent; }

/* honeypot */
.pm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* casetele pentru codul de 6 cifre */
.pm-otp { display: flex; gap: 8px; justify-content: center; margin: 6px 0 4px; }
body.pp-pmea .pm-otp input {
  width: 46px; height: 56px; max-width: none; margin: 0; padding: 0;
  text-align: center; font-size: 1.5rem; font-weight: 700;
  border: 1px solid #cbd5e1; border-radius: 10px; outline: none; color: #0f2f5c;
  font-family: inherit; background: #fff;
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
}
body.pp-pmea .pm-otp input:focus { border-color: #0ea5e9; box-shadow: 0 0 0 3px #bae6fd; }
body.pp-pmea .pm-otp input.bad { border-color: #ef4444; }
body.pp-pmea .pm-otp input:disabled { background: #f8fafc; color: #94a3b8; }
.pm-otp.pulse input { animation: pmPop .4s ease; }
@keyframes pmPop { 0% { transform: scale(1); } 40% { transform: scale(1.09); } 100% { transform: scale(1); } }
.pm-otp.shake { animation: pmShake .4s; }
@keyframes pmShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); }
                     40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.pm-otpmeta { text-align: center; font-size: .86rem; color: #64748b; margin-top: 10px; }
.pm-otpmeta b { color: #0f2f5c; }
.pm-timer.low { color: #dc2626; font-weight: 700; }

@media (max-width: 420px) {
  .pm-otp { gap: 6px; }
  body.pp-pmea .pm-otp input { width: 42px; height: 52px; font-size: 1.3rem; }
}

/* notificare */
.pm-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(22px);
  background: #0f2f5c; color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; box-shadow: 0 12px 34px rgba(15,47,92,.35);
  opacity: 0; transition: .32s cubic-bezier(.2,.7,.3,1); z-index: 2000;
  max-width: calc(100vw - 32px); text-align: center;
}
.pm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pm-toast.err { background: #991b1b; }

/* coloana din dreapta: întrebări frecvente + QR */
.pm-side h3 { color: #1e293b; margin: 0 0 10px; font-size: 1.05rem; }
.pm-side details { border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 8px; }
.pm-side summary { padding: 11px 13px; cursor: pointer; font-weight: 600; font-size: .9rem; color: #1e293b; }
.pm-side details p { padding: 0 13px 11px; font-size: .87rem; color: #64748b; margin: 0; }
.pm-side details a { color: #0369a1; font-weight: 600; }
.pm-qrbox {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px;
  background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px;
}
.pm-qrbox img { width: 92px; height: 92px; border-radius: 6px; flex: 0 0 auto; background: #fff; }
.pm-qrbox small { color: #64748b; font-size: .82rem; }
@media (max-width: 920px) { .pm-qrbox { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .pm-card.pm-entering, .pm-otp.pulse input, .pm-otp.shake { animation: none !important; }
  .pm-card.pm-leaving { transition: none; }
}
