/* =====================================================
   Healing Hands â€“ Patient Intake Form Styles
   File: patient-form.css
   Enqueue handle: hh-patient-form
   ===================================================== */

/* ---------- Root Variables ---------- */
:root {
    --hh-primary:       #0B3DA8;
    --hh-primary-dark:  #133F73;
    --hh-primary-light: #dce8fc;
    --hh-primary-mid:   #4a78d4;
    --hh-accent:        #d40d0d;
    --hh-accent-light:  #fde8e8;
    --hh-text:          #111827;
    --hh-text-muted:    #4b5563;
    --hh-text-hint:     #9ca3af;
    --hh-border:        #c7d9f5;
    --hh-border-focus:  #0B3DA8;
    --hh-bg-page:       #f0f4fb;
    --hh-bg-card:       #ffffff;
    --hh-bg-section:    #f7f9fe;
    --hh-radius-sm:     6px;
    --hh-radius-md:     10px;
    --hh-radius-lg:     14px;
    --hh-shadow:        0 2px 12px rgba(11, 61, 168, 0.08);
    --hh-shadow-focus:  0 0 0 3px rgba(11, 61, 168, 0.18);
}

/* ---------- Outer Wrapper ---------- */
.step_form_container {
    /* max-width: 860px; */
    margin: 2.5rem auto;
    padding: 0 1rem;
    /*font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;*/
    color: var(--hh-text);
}



/* ---------- Section Headings ---------- */
.step_form_container .h2_heading_form {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--hh-primary);
    padding: 0.6rem 0.9rem;
    margin: 2rem 0 1.25rem;
    border-left: 4px solid var(--hh-primary);
    background: linear-gradient(90deg, var(--hh-primary-light), transparent);
    border-radius: 0 var(--hh-radius-sm) var(--hh-radius-sm) 0;
}

.step_form_container .h2_heading_form:first-of-type {
    margin-top: 0;
}

/* ---------- Mandatory / Helper Text ---------- */
.step_form_container .mandatory_field {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--hh-text-muted);
    margin: 0 0 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ---------- Labels ---------- */
.step_form_container label {
    /*display: flex;*/
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--hh-text);
}

.step_form_container .red_col {
    color: var(--hh-accent) !important;
}

/* ---------- Row / Col Grid ---------- */
.step_form_container .uacf7-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    margin-bottom: 1.1rem;
    align-items: end;
}

.step_form_container .uacf7-col[class*="col:6"] {
    grid-column: span 6;
}

.step_form_container .uacf7-col[class*="col:12"],
.step_form_container .uacf7-col[class*="col:4"]:nth-child(3n) {
    grid-column: span 12;
}

.step_form_container .uacf7-col[class*="col:4"] {
    grid-column: span 4;
}

/* CF7 shortcode col class names */
.step_form_container [class^="uacf7-col"] {
    grid-column: span 6;
}

/* ---------- Text / Tel / Email / Date Inputs ---------- */
.step_form_container input[type="text"],
.step_form_container input[type="email"],
.step_form_container input[type="tel"],
.step_form_container input[type="date"],
.step_form_container textarea,
.step_form_container select {
    width: 100%;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    color: var(--hh-text);
    background: var(--hh-bg-section);
    border: 1.5px solid var(--hh-border);
    border-radius: var(--hh-radius-sm);
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.5;
}

.step_form_container input[type="text"]:focus,
.step_form_container input[type="email"]:focus,
.step_form_container input[type="tel"]:focus,
.step_form_container input[type="date"]:focus,
.step_form_container textarea:focus,
.step_form_container select:focus {
    border-color: var(--hh-border-focus);
    box-shadow: var(--hh-shadow-focus);
    background: #fff;
}

.step_form_container input::placeholder,
.step_form_container textarea::placeholder {
    color: var(--hh-text-hint);
    font-weight: 400;
}

.step_form_container textarea {
    min-height: 100px;
    resize: vertical;
}

/* ---------- File Upload ---------- */
.step_form_container input[type="file"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--hh-text-muted);
    background: var(--hh-bg-section);
    border: 1.5px dashed var(--hh-primary-mid);
    border-radius: var(--hh-radius-sm);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    box-sizing: border-box;
}

.step_form_container input[type="file"]:hover {
    border-color: var(--hh-primary);
    background: var(--hh-primary-light);
}

/* ---------- Radio Buttons ---------- */
.step_form_container .wpcf7-radio,
.step_form_container .wpcf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.3rem;
}

.step_form_container .wpcf7-radio .wpcf7-list-item,
.step_form_container .wpcf7-checkbox .wpcf7-list-item {
    margin: 0;
}

.step_form_container .wpcf7-list-item label {
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    font-weight: 400;
    font-size: 0.875rem;
    padding: 0.35rem 0.75rem 0.35rem 0.5rem;
    border: 1.5px solid var(--hh-border);
    border-radius: 20px;
    background: var(--hh-bg-section);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.step_form_container .wpcf7-list-item label:hover {
    border-color: var(--hh-primary-mid);
    background: var(--hh-primary-light);
    color: var(--hh-primary);
}

.step_form_container .wpcf7-list-item input[type="radio"],
.step_form_container .wpcf7-list-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--hh-primary);
    cursor: pointer;
}

/* Selected state via has() */
.step_form_container .wpcf7-list-item:has(input:checked) label {
    border-color: var(--hh-primary);
    background: var(--hh-primary-light);
    color: var(--hh-primary);
    font-weight: 600;
}

/* ---------- Signature Canvas ---------- */
.step_form_container .signature_form,
.step_form_container canvas.wpcf7-signature-canvas {
    border: 1.5px solid var(--hh-border);
    border-radius: var(--hh-radius-sm);
    background: var(--hh-bg-section);
    width: 100% !important;
    max-height: 120px;
}

/* ---------- Conditional Fields ---------- */
.step_form_container .wpcf7cf-hidden {
    display: none !important;
}

/* ---------- Medications Table ---------- */
.step_form_container .table_con {
    overflow-x: auto;
    margin-top: 0.75rem;
    border-radius: var(--hh-radius-md);
    border: 1px solid var(--hh-border);
}

.step_form_container .table_form {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.step_form_container .table_form thead {
    background: linear-gradient(135deg, var(--hh-primary), var(--hh-primary-dark));
    color: #fff;
}

.step_form_container .table_form thead th {
    padding: 0.6rem 0.85rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.775rem;
    letter-spacing: 0.05em;
}

.step_form_container .table_form tbody tr {
    border-bottom: 1px solid var(--hh-border);
    transition: background 0.12s;
}

.step_form_container .table_form tbody tr:last-child {
    border-bottom: none;
}

.step_form_container .table_form tbody tr:hover {
    background: var(--hh-primary-light);
}

.step_form_container .table_form td {
    padding: 0.5rem 0.85rem;
}

.step_form_container .table_form td input[type="text"] {
    background: transparent;
    border: none;
    border-bottom: 1.5px solid var(--hh-border);
    border-radius: 0;
    padding: 0.3rem 0;
    font-size: 0.875rem;
}

.step_form_container .table_form td input[type="text"]:focus {
    border-bottom-color: var(--hh-primary);
    box-shadow: none;
    background: transparent;
}

/* ---------- Step Progress Bar (if plugin adds steps) ---------- */
.uacf7-step-form-progress,
.uacf7_paginiation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0;
    list-style: none;
}

.uacf7-step-form-progress li,
.uacf7_paginiation li {
    flex: 1;
    height: 5px;
    background: var(--hh-border);
    border-radius: 99px;
    transition: background 0.3s;
}

.uacf7-step-form-progress li.active,
.uacf7-step-form-progress li.done,
.uacf7_paginiation li.active,
.uacf7_paginiation li.done {
    background: linear-gradient(135deg, var(--hh-primary), var(--hh-primary-dark));
}

/* ---------- Next / Prev Buttons ---------- */
.step_form_container .uacf7-btn-next,
.step_form_container .uacf7-btn-prev,
.step_form_container input[type="submit"],
.step_form_container button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--hh-radius-sm);
    cursor: pointer;
    transition: opacity 0.18s, transform 0.12s;
    border: none;
    outline: none;
    font-family: inherit;
}

.step_form_container .uacf7-btn-next,
.step_form_container input[type="submit"],
.step_form_container button[type="submit"] {
    background: linear-gradient(135deg, var(--hh-primary), var(--hh-primary-dark));
    color: #fff;
}

.step_form_container .uacf7-btn-prev {
    background: var(--hh-bg-section);
    color: var(--hh-primary);
    border: 1.5px solid var(--hh-primary);
}

.step_form_container .uacf7-btn-next:hover,
.step_form_container input[type="submit"]:hover,
.step_form_container button[type="submit"]:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.step_form_container .uacf7-btn-next:active,
.step_form_container input[type="submit"]:active,
.step_form_container button[type="submit"]:active {
    transform: translateY(0);
}

/* ---------- Button Row ---------- */
.step_form_container .wpcf7-submit-wrap,
.step_form_container .uacf7-step-btn-wrap {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hh-border);
}

/* ---------- Validation / Error ---------- */
.step_form_container .wpcf7-not-valid-tip {
    font-size: 0.78rem;
    color: var(--hh-accent);
    margin-top: 0.25rem;
    display: block;
}

.step_form_container .wpcf7-not-valid {
    border-color: var(--hh-accent) !important;
    box-shadow: 0 0 0 3px rgba(212, 13, 13, 0.12) !important;
}

.step_form_container .wpcf7-response-output {
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: var(--hh-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
}

.step_form_container .wpcf7-mail-sent-ok {
    background: #e9fbf1;
    color: #166534;
}

.step_form_container .wpcf7-validation-errors {
    background: var(--hh-accent-light);
    color: var(--hh-accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .wpcf7-form {
        padding: 1.5rem 1rem;
    }

    .step_form_container .uacf7-row {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
    }

    .step_form_container [class^="uacf7-col"] {
        width: 100%;
    }

    .step_form_container .table_form thead {
        display: none;
    }

    .step_form_container .table_form td {
        display: block;
        width: 100%;
        padding: 0.4rem 0.75rem;
    }
}
