/*
 * Rakicka Food Concept — 1C "Konsultacje online" (page-templates/1c-online.php).
 * Loaded after home-1c.css and 1c/sub.css. Includes the styles for the Contact Form 7 form.
 */

/* ---------- Hero ---------- */
.online-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: clamp(32px, 6vw, 96px); align-items: center; }
.online-hero h1 { max-width: 16ch; }
.online-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--wash); }
.online-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgb(0 0 0 / 55%)); }
.online-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.online-photo figcaption { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; color: #fff; font-size: .95rem; line-height: 1.4; }
.online-photo figcaption strong { display: block; font: 450 1.3rem/1.2 var(--serif); }

/* ---------- Plans ---------- */
#plany .plan .btn { margin-top: auto; }

/* ---------- Steps in one row ---------- */
.steps--row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.steps--row .step { padding: 76px 22px 24px; }
.steps--row .step::before { left: 22px; top: 22px; }
.steps--row .step h3 { font-size: 1.2rem; }
.steps--row .step p { font-size: 1rem; }

/* ---------- Form section ---------- */
.form-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.form-intro h2 { margin: 16px 0 18px; }
.form-intro > p { font-size: 1.15rem; max-width: 44ch; }
.form-points { display: grid; gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.form-points li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; color: var(--muted); font-size: 1rem; line-height: 1.45; }
.form-points svg { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--white); color: var(--green-text); }
.form-points strong { display: block; color: var(--ink); font-size: 1.05rem; }
.form-points a { color: var(--ink); font-weight: 600; }
.form-card { padding: clamp(24px, 3.5vw, 40px); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.admin-note { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: #fff4d6; color: #5a4200; font-size: .95rem; }

/* ---------- Contact Form 7 ---------- */
.form-card .wpcf7 form > p, .form-card .wpcf7 form > div > p { margin: 0; }
.form-card .wpcf7 br { display: none; }
.rfc-form { display: grid; gap: 18px; }
.form-card .rfc-form > p { display: grid; gap: 18px; } /* CF7 puts consecutive fields into one paragraph */
.rfc-form .f-field { display: grid; gap: 7px; color: var(--ink); font-size: 1rem; font-weight: 600; }
.rfc-form .f-field em { color: var(--muted); font-style: normal; font-weight: 400; }
.rfc-form .wpcf7-form-control-wrap { display: block; }
.rfc-form input[type="text"], .rfc-form input[type="email"], .rfc-form input[type="tel"], .rfc-form textarea {
  width: 100%; min-height: 54px; padding: 13px 16px; border: 1px solid #cfd6bd; border-radius: 12px;
  background: var(--white); color: var(--ink); font: 400 1.05rem/1.4 var(--sans);
  transition: border-color .15s, box-shadow .15s;
}
.rfc-form textarea { min-height: 120px; resize: vertical; }
.rfc-form input::placeholder, .rfc-form textarea::placeholder { color: #8a937e; }
.rfc-form input:focus, .rfc-form textarea:focus { outline: none; border-color: var(--green-text); box-shadow: 0 0 0 3px rgb(169 201 47 / 35%); }
.rfc-form .wpcf7-not-valid { border-color: #b3261e !important; }
.rfc-form .wpcf7-not-valid-tip { display: block; margin-top: 6px; color: #b3261e; font-size: .92rem; font-weight: 500; }

/* Plan choice as pills */
.rfc-form .f-plan { margin: 0; padding: 0; border: 0; min-width: 0; }
.rfc-form .f-plan legend { margin-bottom: 8px; padding: 0; color: var(--ink); font-size: 1rem; font-weight: 600; }
.rfc-form .wpcf7-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.rfc-form .wpcf7-radio .wpcf7-list-item { margin: 0; }
.rfc-form .wpcf7-radio label { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.rfc-form .wpcf7-radio input { position: absolute; opacity: 0; pointer-events: none; }
.rfc-form .wpcf7-radio .wpcf7-list-item-label {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px; border: 1px solid #cfd6bd; border-radius: 999px;
  background: var(--white); color: var(--ink-2); font-size: 1rem; font-weight: 600; transition: background-color .15s, border-color .15s, color .15s;
}
.rfc-form .wpcf7-radio label:hover .wpcf7-list-item-label { border-color: var(--green-text); }
.rfc-form .wpcf7-radio input:checked + .wpcf7-list-item-label { background: var(--forest); border-color: var(--forest); color: #fff; }
.rfc-form .wpcf7-radio input:focus-visible + .wpcf7-list-item-label { outline: 3px solid var(--green-text); outline-offset: 2px; }

/* Consent checkbox */
.rfc-form .f-consent { padding: 16px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.rfc-form .wpcf7-acceptance .wpcf7-list-item { display: block; margin: 0; }
.rfc-form .wpcf7-acceptance label { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; cursor: pointer; }
.rfc-form .wpcf7-acceptance input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green-text); cursor: pointer; }
.rfc-form .wpcf7-acceptance .wpcf7-list-item-label { color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.rfc-form .wpcf7-acceptance a, .rfc-form .f-note a { color: var(--ink); font-weight: 600; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Submit + messages */
.rfc-form .wpcf7-submit { width: 100%; border: 0; }
.rfc-form .wpcf7-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.rfc-form .wpcf7-spinner { display: block; margin: 10px auto 0; }
.rfc-form .f-note { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.form-card .wpcf7 .wpcf7-response-output { margin: 4px 0 0; padding: 14px 16px; border: 0; border-radius: 12px; font-size: 1rem; line-height: 1.5; }
.form-card .wpcf7 form.sent .wpcf7-response-output { background: var(--wash); color: var(--ink); border-left: 4px solid var(--green); }
.form-card .wpcf7 form.invalid .wpcf7-response-output,
.form-card .wpcf7 form.unaccepted .wpcf7-response-output,
.form-card .wpcf7 form.payment-required .wpcf7-response-output { background: #fff4d6; color: #5a4200; }
.form-card .wpcf7 form.failed .wpcf7-response-output,
.form-card .wpcf7 form.aborted .wpcf7-response-output,
.form-card .wpcf7 form.spam .wpcf7-response-output { background: #fde8e6; color: #7a1c15; }

/* Old 3-field form (fallback until the new one exists): readable at least */
.form-card .wpcf7 form:not(.rfc-form) p { margin: 0 0 14px; font-weight: 600; color: var(--ink); }
.form-card .wpcf7 form:not(.rfc-form) input:not([type="submit"]):not([type="hidden"]) { width: 100%; min-height: 50px; margin-top: 6px; padding: 12px 14px; border: 1px solid #cfd6bd; border-radius: 12px; font: 400 1.05rem var(--sans); }
.form-card .wpcf7 form:not(.rfc-form) input[type="submit"] { min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--green); color: var(--ink); font: 600 1.05rem var(--sans); cursor: pointer; }

/* reCAPTCHA badge: keep it clear of the phone booking bar */
@media (max-width: 640px) { .grecaptcha-badge { bottom: 96px !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .steps--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .online-hero-grid { grid-template-columns: 1fr; }
  .online-photo { display: none; }
  .form-layout { grid-template-columns: 1fr; }
  .steps--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .online-hero .hero-actions .btn { flex: 1 1 100%; }
  .steps--row { grid-template-columns: 1fr; }
  .steps--row .step { padding: 22px 22px 22px 74px; }
  .form-card { padding: 22px 18px; }
}
