/* Helen Doron Hybrid Lead Form Styles */

.hd-form-container {
    max-width: 480px;
    margin: 20px auto;
    padding: 24px;
    background: var(--hd-form-bg, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: #1f2937;
    box-sizing: border-box;
}

.hd-form-container * {
    box-sizing: border-box;
}

/* Landing Page / Transparent Compact Mode (When Labels are Hidden) */
.hd-form-container.hd-hide-labels {
    background: var(--hd-form-bg, transparent) !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: 440px;
    margin: 0 auto;
}

.hd-form-container.hd-hide-labels .hd-form-section {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    margin-top: 0;
}

.hd-form-container.hd-hide-labels .hd-section-title {
    display: none !important;
}

.hd-form-container.hd-hide-labels label:not(.hd-checkbox-label) {
    display: none !important;
}

.hd-form-container.hd-hide-labels .hd-form-row {
    margin-bottom: 0;
    gap: 12px;
}

.hd-form-container.hd-hide-labels .hd-field-group {
    margin-bottom: 12px;
}

/* Headings */
.hd-form-heading,
.hd-form-container .hd-form-heading,
.hd-form-container h2.hd-form-heading {
    margin: 0 0 16px !important;
    font-size: 34px !important;
    font-weight: bold !important;
    color: #ffffff !important;
    text-align: left !important;
    letter-spacing: -0.5px !important;
    line-height: 1.15 !important;
    text-shadow: none !important;
}

.hd-form-subheading {
    margin: 0 0 16px;
    font-size: 14px;
    color: #64748b;
    text-align: left;
}

.hd-form-container.hd-hide-labels .hd-form-subheading {
    color: #ffffff;
}

/* Sections */
.hd-form-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.hd-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 12px;
}

.hd-section-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: #2b3a4a;
    letter-spacing: -0.2px;
}

/* Grid & Rows */
.hd-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.hd-form-row:last-child {
    margin-bottom: 0;
}

.hd-row-2 .hd-field-group {
    flex: 1;
    min-width: 0;
}

/* Fields & Inputs (Pill cards matching Image 1) */
.hd-field-group {
    margin-bottom: 12px;
    position: relative;
    width: 100%;
}

.hd-field-group:last-child {
    margin-bottom: 0;
}

.hd-field-group label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--hd-font-size, 13px);
    font-weight: 600;
    color: #374151;
}

.hd-req {
    color: #e53935;
    margin-left: 2px;
}

.hd-row-child-birth .hd-field-child-month,
.hd-row-child-birth .hd-field-child-year {
    flex: 1;
    min-width: 0;
}

.hd-form-container .hd-field-group input[type="text"],
.hd-form-container .hd-field-group input[type="email"],
.hd-form-container .hd-field-group input[type="tel"],
.hd-form-container .hd-field-group select,
.hd-field-group input[type="text"],
.hd-field-group input[type="email"],
.hd-field-group input[type="tel"],
.hd-field-group select {
    width: 100% !important;
    height: var(--hd-field-height, 38px) !important;
    min-height: var(--hd-field-height, 38px) !important;
    max-height: var(--hd-field-height, 38px) !important;
    padding: 0 14px !important;
    font-size: var(--hd-font-size, 14px) !important;
    line-height: var(--hd-field-height, 38px) !important;
    color: #2b3a4a !important;
    background-color: #ffffff !important;
    border: var(--hd-field-border, 1px solid #ffffff) !important;
    border-radius: var(--hd-field-radius, 8px) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    outline: none !important;
    font-family: inherit !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
}

.hd-form-container .hd-field-group textarea,
.hd-field-group textarea {
    width: 100% !important;
    height: auto !important;
    min-height: 80px !important;
    padding: 10px 14px !important;
    font-size: var(--hd-font-size, 15px) !important;
    line-height: 1.4 !important;
    color: #2b3a4a !important;
    background-color: #ffffff !important;
    border: var(--hd-field-border, 1px solid #ffffff) !important;
    border-radius: var(--hd-field-radius, 8px) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    outline: none !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
}

/* Custom Dropdown Arrow (Crisp solid dark downward triangle ▼ matching Image 1) */
.hd-field-group select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232b3a4a'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 18px !important;
    padding-right: 38px !important;
    cursor: pointer !important;
}

.hd-field-group select:disabled,
.hd-field-group input:disabled,
.hd-field-group textarea:disabled {
    background-color: #ececec !important;
    color: #575757 !important;
    -webkit-text-fill-color: #575757 !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
    border: 1px solid #ececec !important;
}

.hd-field-group input::placeholder,
.hd-field-group textarea::placeholder {
    color: #575757 !important;
    opacity: 0.9 !important;
}

/* Select Dropdown Placeholders (Month, Year, and unselected dropdowns matching input placeholder grey) */
.hd-form-container .hd-field-group select:invalid,
.hd-field-group select:invalid,
.hd-form-container .hd-field-group select.hd-select-placeholder,
.hd-field-group select.hd-select-placeholder,
.hd-form-container .hd-field-group select:has(option[value=""]:checked),
.hd-field-group select:has(option[value=""]:checked) {
    color: #575757 !important;
    opacity: 0.9 !important;
}

/* Dropdown Options List Styling */
.hd-form-container .hd-field-group select option,
.hd-field-group select option {
    color: #2b3a4a !important;
}

.hd-form-container .hd-field-group select option[value=""],
.hd-field-group select option[value=""],
.hd-form-container .hd-field-group select option:disabled,
.hd-field-group select option:disabled {
    color: #575757 !important;
}

.hd-field-group input:focus,
.hd-field-group select:focus,
.hd-field-group textarea:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18) !important;
}

/* Field Validation Errors */
.hd-field-error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    display: none;
}

.hd-field-group.hd-has-error input,
.hd-field-group.hd-has-error select,
.hd-field-group.hd-has-error textarea {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.hd-field-group.hd-has-error .hd-field-error {
    display: block;
}

/* Country Mismatch Alert (Matches Screenshot) */
.hd-country-alert {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    padding: 8px 14px;
    margin-bottom: 10px;
    animation: hdFadeIn 0.25s ease-out;
}

.hd-country-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #ea580c;
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.hd-country-alert-msg {
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* Address Hint & Nearest Hint - Hidden */
.hd-address-hint,
.hd-nearest-hint,
.hd-form-container .hd-address-hint,
.hd-form-container .hd-nearest-hint,
.hd-form-container.hd-hide-labels .hd-address-hint,
.hd-form-container.hd-hide-labels .hd-nearest-hint {
    display: none !important;
}

@keyframes hdFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Consent Checkbox & Text matching Image 1 */
.hd-field-consent {
    margin-top: 8px !important;
    margin-bottom: 16px !important;
}

.hd-checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    color: #0f2942 !important;
    cursor: pointer !important;
    line-height: 1.45 !important;
    text-align: start !important;
}

.hd-form-container.hd-hide-labels .hd-checkbox-label {
    color: #0f2942 !important;
}

.hd-checkbox-label input[type="checkbox"] {
    margin-top: 3px !important;
    width: 17px !important;
    height: 17px !important;
    border-radius: 3px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    accent-color: #e61d72 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.hd-checkbox-label a {
    color: #0f2942 !important;
    text-decoration: underline !important;
    font-weight: 500 !important;
}

.hd-checkbox-label a:hover {
    color: #e61d72 !important;
}

.hd-field-group.hd-field-consent.hd-has-error .hd-checkbox-label {
    color: #b91c1c !important;
}

.hd-field-group.hd-field-consent.hd-has-error input[type="checkbox"] {
    outline: 2px solid #ef4444 !important;
    border-color: #ef4444 !important;
}

/* Submit Button (Vibrant Pink, Sentence Case, 56px height, rounded corners matching Image 1) */
.hd-form-actions {
    margin-top: 14px !important;
    display: flex !important;
    justify-content: var(--hd-btn-align, center) !important;
    width: 100% !important;
}

.hd-submit-btn,
.hd-form-container .hd-submit-btn,
.hd-form-container button[type="submit"].hd-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: var(--hd-btn-width, 100%) !important;
    max-width: 100% !important;
    height: 56px !important;
    padding: 0 24px !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background-color: #e61d72 !important;
    background: #e61d72 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    text-transform: none !important;
    /* CRITICAL: prevents theme uppercase SUBMIT */
    letter-spacing: -0.3px !important;
    box-shadow: 0 4px 14px rgba(230, 29, 114, 0.3) !important;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease !important;
    outline: none !important;
    font-family: inherit !important;
}

.hd-submit-btn:hover,
.hd-form-container .hd-submit-btn:hover,
.hd-form-container button[type="submit"].hd-submit-btn:hover {
    background-color: #d41264 !important;
    background: #d41264 !important;
    box-shadow: 0 6px 18px rgba(230, 29, 114, 0.4) !important;
}

.hd-submit-btn:active,
.hd-form-container .hd-submit-btn:active,
.hd-form-container button[type="submit"].hd-submit-btn:active {
    transform: scale(0.99) !important;
}

.hd-submit-btn:disabled,
.hd-form-container .hd-submit-btn:disabled,
.hd-form-container button[type="submit"].hd-submit-btn:disabled {
    background: #9ca3af !important;
    background-color: #9ca3af !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.hd-submit-btn .hd-btn-text {
    text-transform: none !important;
}

/* Spinner */
.hd-btn-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: hdSpin 0.75s linear infinite;
}

@keyframes hdSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Multi-Step / Wizard Mode */
.hd-step-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 20px 0;
    padding: 0 4px;
    position: relative;
}

.hd-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.hd-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.hd-step-item.hd-step-active .hd-step-badge {
    background: #e61d72;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(230, 29, 114, 0.18);
}

.hd-step-item.hd-step-completed .hd-step-badge {
    background: #10b981;
    color: #ffffff;
}

.hd-step-title {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    transition: color 0.25s ease;
}

.hd-step-item.hd-step-active .hd-step-title {
    color: #0f172a;
    font-weight: 700;
}

.hd-step-divider {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 12px;
    border-radius: 2px;
    transition: background 0.25s ease;
}

.hd-step-divider.hd-divider-active {
    background: #e61d72;
}

/* Step Panels */
.hd-step-panel {
    display: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.hd-step-panel.hd-step-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Step Actions & Navigation Buttons */
.hd-step-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    width: 100%;
}

.hd-btn-next,
.hd-form-container .hd-btn-next {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: var(--hd-btn-width, 100%) !important;
    height: var(--hd-field-height, 52px) !important;
    padding: 0 24px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: #e61d72 !important;
    border: none !important;
    border-radius: var(--hd-field-radius, 8px) !important;
    cursor: pointer !important;
    text-transform: none !important;
    letter-spacing: -0.2px !important;
    box-shadow: 0 4px 14px rgba(230, 29, 114, 0.25) !important;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease !important;
}

.hd-btn-next:hover,
.hd-form-container .hd-btn-next:hover {
    background: #d41264 !important;
    box-shadow: 0 6px 18px rgba(230, 29, 114, 0.35) !important;
}

.hd-btn-back,
.hd-form-container .hd-btn-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: var(--hd-field-height, 52px) !important;
    padding: 0 18px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--hd-field-radius, 8px) !important;
    cursor: pointer !important;
    text-transform: none !important;
    transition: background 0.2s ease !important;
    white-space: nowrap !important;
}

.hd-btn-back:hover,
.hd-form-container .hd-btn-back:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.hd-step-actions .hd-submit-btn {
    flex: 1;
}

/* Feedback Response Box */
.hd-form-response {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.hd-form-response.hd-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.hd-form-response.hd-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
@media screen and (max-width: 640px) {
    .hd-form-container {
        padding: 16px 12px;
        margin: 10px auto;
    }

    .hd-form-row {
        flex-direction: column !important;
        gap: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Enforce exact 12px spacing beneath all field groups uniformly */
    .hd-field-group,
    .hd-form-container .hd-field-group,
    .hd-form-container.hd-hide-labels .hd-field-group,
    .hd-form-row .hd-field-group,
    .hd-form-container.hd-hide-labels .hd-form-row .hd-field-group {
        margin-bottom: 12px !important;
    }

    .hd-submit-btn,
    .hd-form-container .hd-submit-btn {
        font-size: 22px !important;
        height: 50px !important;
    }
}

/* Google Places Autocomplete Dropdown Styling & High Z-Index */
.pac-container {
    z-index: 999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    margin-top: 4px !important;
}

.pac-item {
    padding: 10px 14px !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

.pac-item:hover,
.pac-item-selected {
    background-color: #f3f4f6 !important;
}

/* ==========================================================================
   RTL (Right-to-Left) Mode (Hebrew, Arabic, etc.)
   ========================================================================== */
.hd-form-container.hd-is-rtl,
.hd-form-container[dir="rtl"],
[dir="rtl"] .hd-form-container,
body.rtl .hd-form-container {
    direction: rtl !important;
    text-align: right !important;
}

.hd-form-container.hd-is-rtl .hd-form-heading,
.hd-form-container.hd-is-rtl .hd-form-subheading,
.hd-form-container.hd-is-rtl .hd-section-title,
.hd-form-container[dir="rtl"] .hd-form-heading,
.hd-form-container[dir="rtl"] .hd-form-subheading,
.hd-form-container[dir="rtl"] .hd-section-title,
[dir="rtl"] .hd-form-container .hd-form-heading,
[dir="rtl"] .hd-form-container .hd-form-subheading,
[dir="rtl"] .hd-form-container .hd-section-title,
body.rtl .hd-form-container .hd-form-heading,
body.rtl .hd-form-container .hd-form-subheading,
body.rtl .hd-form-container .hd-section-title {
    text-align: right !important;
    direction: rtl !important;
}

.hd-form-container.hd-is-rtl .hd-field-group label,
.hd-form-container[dir="rtl"] .hd-field-group label,
[dir="rtl"] .hd-form-container .hd-field-group label,
body.rtl .hd-form-container .hd-field-group label {
    text-align: right !important;
    direction: rtl !important;
}

.hd-form-container.hd-is-rtl .hd-req,
.hd-form-container[dir="rtl"] .hd-req,
[dir="rtl"] .hd-form-container .hd-req,
body.rtl .hd-form-container .hd-req {
    margin-right: 2px !important;
    margin-left: 0 !important;
}

/* RTL Text Inputs & Textareas */
.hd-form-container.hd-is-rtl input[type="text"],
.hd-form-container.hd-is-rtl textarea,
.hd-form-container[dir="rtl"] input[type="text"],
.hd-form-container[dir="rtl"] textarea,
[dir="rtl"] .hd-form-container input[type="text"],
[dir="rtl"] .hd-form-container textarea,
body.rtl .hd-form-container input[type="text"],
body.rtl .hd-form-container textarea {
    text-align: right !important;
    direction: rtl !important;
}

/* Phone & Email Inputs in RTL */
.hd-form-container.hd-is-rtl input[type="tel"],
.hd-form-container[dir="rtl"] input[type="tel"],
[dir="rtl"] .hd-form-container input[type="tel"],
body.rtl .hd-form-container input[type="tel"],
.hd-form-container.hd-is-rtl input[type="email"],
.hd-form-container[dir="rtl"] input[type="email"],
[dir="rtl"] .hd-form-container input[type="email"],
body.rtl .hd-form-container input[type="email"] {
    text-align: right !important;
    direction: ltr !important;
}

/* RTL Select Dropdowns: Move Dropdown Chevron Arrow to the LEFT side! */
.hd-form-container.hd-is-rtl .hd-field-group select,
.hd-form-container[dir="rtl"] .hd-field-group select,
[dir="rtl"] .hd-form-container .hd-field-group select,
body.rtl .hd-form-container .hd-field-group select,
.hd-is-rtl select,
[dir="rtl"] select {
    background-position: left 14px center !important;
    padding-left: 38px !important;
    padding-right: 14px !important;
    text-align: right !important;
    direction: rtl !important;
}

.hd-form-container.hd-is-rtl .hd-field-group select option,
.hd-form-container[dir="rtl"] .hd-field-group select option,
[dir="rtl"] .hd-form-container .hd-field-group select option,
body.rtl .hd-form-container .hd-field-group select option {
    text-align: right !important;
    direction: rtl !important;
}

/* RTL Consent Checkbox */
.hd-form-container.hd-is-rtl .hd-field-consent .hd-checkbox-label,
.hd-form-container[dir="rtl"] .hd-field-consent .hd-checkbox-label,
[dir="rtl"] .hd-form-container .hd-field-consent .hd-checkbox-label,
body.rtl .hd-form-container .hd-field-consent .hd-checkbox-label {
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    text-align: right !important;
    direction: rtl !important;
}

.hd-form-container.hd-is-rtl .hd-field-error,
.hd-form-container[dir="rtl"] .hd-field-error,
[dir="rtl"] .hd-form-container .hd-field-error,
body.rtl .hd-form-container .hd-field-error {
    text-align: right !important;
    direction: rtl !important;
}

.hd-form-container.hd-is-rtl .hd-submit-btn,
.hd-form-container[dir="rtl"] .hd-submit-btn,
[dir="rtl"] .hd-form-container .hd-submit-btn,
body.rtl .hd-form-container .hd-submit-btn {
    text-align: center !important;
}