/*
 * /consult/assets/consultation.css
 * Стили страницы консультации PROCTOLINE.
 */

.pl-consult-page {
  --pl-accent: #009bad;
  --pl-accent-dark: #007c8a;
  --pl-text: #1f2a2e;
  --pl-muted: #6b7a80;
  --pl-bg: #ffffff;
  --pl-bg-soft: #f4f9fa;
  --pl-border: #e1ebec;
  --pl-danger: #d64545;
  --pl-radius: 16px;
  --pl-shadow: 0 10px 30px rgba(0, 40, 45, 0.16);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;

  box-sizing: border-box;
}

.pl-consult-page *,
.pl-consult-page *::before,
.pl-consult-page *::after {
  box-sizing: border-box;
}


/* -------------------------------------------------------------- */
/* Standalone consultation page                                   */
/* -------------------------------------------------------------- */

.pl-consult-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 56px;
  color: var(--pl-text);
}

.pl-consult-page-header {
  text-align: center;
  margin-bottom: 24px;
}

.pl-consult-page-title {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--pl-text);
}

.pl-consult-page-subtitle {
  font-size: 15px;
  color: var(--pl-muted);
  line-height: 1.5;
  margin: 0;
}

.pl-consult-page-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pl-muted);
  margin: 14px 0 0;
  background: var(--pl-bg-soft);
  border-radius: 999px;
  padding: 6px 14px;
}


/* -------------------------------------------------------------- */
/* Consultation card                                              */
/* -------------------------------------------------------------- */

.pl-consult-card {
  background: var(--pl-bg);
  border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius);
  box-shadow: 0 4px 18px rgba(0, 40, 45, 0.08);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}


/* -------------------------------------------------------------- */
/* Doctors                                                        */
/* -------------------------------------------------------------- */

.pl-consult-field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--pl-text);
  margin: 15px 0 8px;
}

.pl-consult-doctors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pl-consult-doctor {
  margin: 0;
}

.pl-consult-doctor-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;

  border: 1px solid var(--pl-border);
  border-radius: 12px;
  padding: 14px 10px;

  cursor: pointer;

  transition:
    border-color 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.pl-consult-doctor-label:hover {
  border-color: var(--pl-accent);
}

.pl-consult-doctor-input {
  width: 18px;
  height: 18px;
  accent-color: var(--pl-accent);
  flex-shrink: 0;
}

.pl-consult-doctor-input:focus-visible {
  outline: 3px solid var(--pl-accent);
  outline-offset: 2px;
}

.pl-consult-doctor-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;

  background: var(--pl-bg-soft);
  border: 1px solid var(--pl-border);
}

.pl-consult-doctor-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pl-consult-doctor-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--pl-text);

  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-consult-doctor-role {
  font-size: 12px;
  color: var(--pl-muted);

  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-consult-doctor-label.pl-is-selected {
  border-color: var(--pl-accent);
  background: var(--pl-bg-soft);
  box-shadow: inset 0 0 0 1px var(--pl-accent);
}

.pl-consult-doctor-label.pl-is-selected
.pl-consult-doctor-name::after {
  content: " ✓";
  color: var(--pl-accent);
}


/* -------------------------------------------------------------- */
/* Form fields                                                     */
/* -------------------------------------------------------------- */

.pl-consult-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pl-consult-input,
.pl-consult-select {
  width: 100%;

  font-size: 16px;
  padding: 12px 14px;

  border-radius: 10px;
  border: 1px solid var(--pl-border);

  background: #fff;
  color: var(--pl-text);

  min-height: 48px;
}

.pl-consult-input:focus-visible,
.pl-consult-select:focus-visible {
  outline: 3px solid var(--pl-accent);
  outline-offset: 1px;
  border-color: var(--pl-accent);
}

.pl-consult-input.pl-is-invalid {
  border-color: var(--pl-danger);
}

.pl-consult-error {
  font-size: 12px;
  color: var(--pl-danger);
  min-height: 16px;
}


/* -------------------------------------------------------------- */
/* Textarea                                                       */
/* -------------------------------------------------------------- */

.pl-consult-textarea {
  width: 100%;

  font-size: 16px;
  padding: 12px 14px;

  border-radius: 10px;
  border: 1px solid var(--pl-border);

  background: #fff;
  color: var(--pl-text);

  min-height: 96px;
  resize: vertical;

  font-family: inherit;
  line-height: 1.4;
}

.pl-consult-textarea:focus-visible {
  outline: 3px solid var(--pl-accent);
  outline-offset: 1px;
  border-color: var(--pl-accent);
}


/* -------------------------------------------------------------- */
/* File attachments                                               */
/* -------------------------------------------------------------- */

.pl-consult-file {
  width: 100%;
  font-size: 14px;
  padding: 10px 4px;
  color: var(--pl-text);
}

.pl-consult-file:focus-visible {
  outline: 3px solid var(--pl-accent);
  outline-offset: 2px;
}

.pl-consult-file-hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--pl-muted);
}

.pl-consult-file-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pl-consult-file-list:empty {
  display: none;
}

.pl-consult-file-list li {
  font-size: 12px;
  color: var(--pl-text);

  background: var(--pl-bg-soft);

  border-radius: 8px;
  padding: 6px 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pl-consult-file-list li.pl-is-invalid {
  color: var(--pl-danger);
  background: #fdecec;
}


/* -------------------------------------------------------------- */
/* Honeypot                                                       */
/* -------------------------------------------------------------- */

.pl-consult-honeypot {
  position: absolute !important;
  left: -9999px !important;

  width: 1px;
  height: 1px;

  overflow: hidden;
}


/* -------------------------------------------------------------- */
/* Submit button                                                  */
/* -------------------------------------------------------------- */

.pl-consult-submit {
  appearance: none;

  border: none;
  background: var(--pl-accent);
  color: #fff;

  font-size: 15px;
  font-weight: 700;

  padding: 14px 18px;

  border-radius: 12px;

  cursor: pointer;
display: block;
margin: 0 auto;
  min-height: 48px;

  transition: background 0.15s ease;
}

.pl-consult-submit:hover {
  background: var(--pl-accent-dark);
}

.pl-consult-submit:focus-visible {
  outline: 3px solid var(--pl-accent-dark);
  outline-offset: 2px;
}

.pl-consult-submit:disabled {
  opacity: 0.6;
  cursor: default;
}


/* -------------------------------------------------------------- */
/* Privacy / fine print                                           */
/* -------------------------------------------------------------- */

.pl-consult-fineprint {
  margin: 0;

  font-size: 11px;
  line-height: 1.4;

  color: var(--pl-muted);

  text-align: center;
}


/* -------------------------------------------------------------- */
/* Form errors                                                    */
/* -------------------------------------------------------------- */

.pl-consult-form-error {
  font-size: 13px;
  color: var(--pl-danger);

  background: #fdecec;

  border: 1px solid #f4c6c6;
  border-radius: 10px;

  padding: 10px 12px;

  display: none;
}

.pl-consult-form-error.pl-is-visible {
  display: block;
}


/* -------------------------------------------------------------- */
/* Result                                                         */
/* -------------------------------------------------------------- */

.pl-consult-page-result {
  text-align: center;
  padding: 40px 16px;
}

.pl-consult-page-result-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.pl-consult-page-result-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 10px;
}

.pl-consult-page-result-text {
  font-size: 15px;
  color: var(--pl-muted);
  line-height: 1.5;

  max-width: 440px;
  margin: 0 auto;
}

.pl-consult-back-link {
  display: inline-block;

  margin-top: 22px;

  color: var(--pl-accent);
  font-weight: 600;
  text-decoration: none;
}

.pl-consult-back-link:hover {
  text-decoration: underline;
}


/* -------------------------------------------------------------- */
/* Mobile                                                         */
/* -------------------------------------------------------------- */

@media (max-width: 480px) {

  .pl-consult-page {
    padding: 24px 12px 40px;
  }

  .pl-consult-page-title {
    font-size: 23px;
  }

  .pl-consult-card {
    padding: 16px;
    border-radius: 14px;
  }

  .pl-consult-doctors {
    grid-template-columns: 1fr;
  }

  .pl-consult-doctor-label {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 10px;
  }

  .pl-consult-doctor-photo {
    width: 54px;
    height: 54px;
  }
}

/* ==========================================================
   ФОРМАТ КОНСУЛЬТАЦІЇ
========================================================== */

.pl-consult-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pl-consult-type-card {
  position: relative;
  display: block;
  cursor: pointer;
  border: 1px solid #dfe5e8;
  border-radius: 14px;
  background: #fff;
  padding: 18px;
  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background-color .2s ease;
}

.pl-consult-type-card:hover {
  border-color: var(--pl-primary, #0b6f63);
}

.pl-consult-type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pl-consult-type-card:has(input:checked) {
  border-color: var(--pl-primary, #0b6f63);
  background: #f5fbfa;
  box-shadow: 0 0 0 2px rgba(11, 111, 99, .08);
}

.pl-consult-type-card-content {
  display: flex;
  flex-direction: column;
  min-height: 120px;
}

.pl-consult-type-title {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--pl-text);
  padding-right: 24px;
}

.pl-consult-type-price {
  margin-top: 9px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--pl-primary, #0b6f63);
}

.pl-consult-type-description {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--pl-muted, #68757a);
}

@media (max-width: 640px) {
  .pl-consult-type-options {
    grid-template-columns: 1fr;
  }

  .pl-consult-type-card-content {
    min-height: 0;
  }
}

/* ----------------------------------------------------------
   Галочка выбранного формата консультації
---------------------------------------------------------- */

.pl-consult-type-card:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 12px;

  width: 22px;
  height: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: var(--pl-accent);
  color: #fff;

  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

/* ==========================================================
   ONLINE INDICATOR
========================================================== */

.pl-consult-doctor-label {
  position: relative;
}

.pl-consult-doctor-online {
  position: absolute;
  top: 9px;
  right: 9px;

  display: inline-flex;
  align-items: center;
  gap: 5px;

  font-size: 11px;
  line-height: 1;
  font-weight: 700;

  color: #16823b;
  background: #f0faf3;

  border-radius: 999px;
  padding: 5px 7px;
}

.pl-consult-doctor-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;

  background: #20b957;

  animation: plDoctorOnlinePulse 1.4s ease-in-out infinite;
}

@keyframes plDoctorOnlinePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .35;
    transform: scale(.7);
  }
}