/* assets/css/frontend-style.css */

/* ============ Form Wrapper ============ */
.cfm-form-wrapper {
    max-width: 720px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.cfm-form {
    position: relative;
}

.cfm-hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* ============ Ananta Yoga Custom Form Styles ============ */
.ay-contact-form-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

.ay-contact-card {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 15, 43, 0.08);
}

.ay-form-section-title {
    font-family: 'Sarala', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #000F2B;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef1f5;
}

.ay-field-group {
    margin-bottom: 16px;
    text-align: left;
}

.ay-field-label {
    display: block;
    text-align: left;
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #000F2B;
    margin-bottom: 6px;
}

.ay-field-label .required-star {
    color: #71B230;
    margin-left: 4px;
}

.ay-field-helper {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
    margin-bottom: 6px;
}

.ay-input-text,
.ay-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
    color: #374151;
    box-sizing: border-box;
    text-align: left;
}

.ay-input-text:focus,
.ay-textarea:focus {
    outline: none;
    border-color: #71B230;
    box-shadow: 0 0 0 3px rgba(113, 178, 48, 0.15);
}

.ay-textarea {
    resize: vertical;
    min-height: 90px;
}

.ay-options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.ay-option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
    color: #4B4F58;
    cursor: pointer;
    padding: 8px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    transition: all 0.2s;
    background: #fff;
    text-align: left;
    justify-content: flex-start;
}

.ay-option-label:hover {
    border-color: #71B230;
    background: #F0F7E9;
}

.ay-option-label input {
    width: 16px;
    height: 16px;
    accent-color: #71B230;
    margin: 0;
}

.ay-conditional-wrap {
    margin-top: 12px;
    padding: 14px 18px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    display: none;
}

.ay-consent-box {
    margin-top: 4px;
}

.ay-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.ay-consent-label input {
    margin-top: 2px;
    accent-color: #71B230;
}

.ay-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: #000F2B;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Sarala', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ay-submit-btn:hover {
    background: #71B230;
}

.ay-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#ay-form-feedback {
    display: none;
}

/* ============ Default Form Messages (fallback) ============ */
.cfm-form-messages {
    margin-top: 16px;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.cfm-form-messages.cfm-msg-error {
    background: #fef0f0;
    color: #dc3232;
    border: 1px solid #fdd;
}

.cfm-form-messages.cfm-msg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.cfm-success-message {
    text-align: center;
    padding: 40px 20px;
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: 12px;
}

.cfm-success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.cfm-success-message p {
    font-size: 16px;
    color: #166534;
    margin: 0;
    line-height: 1.6;
}

.cfm-field-error {
    font-size: 12px;
    color: #dc3232;
    margin-top: 4px;
    font-weight: 500;
}

/* Notice box (e.g. "Form not found") */
p.cfm-error {
    background: #fef0f0;
    color: #dc3232;
    padding: 14px 20px;
    border: 1px solid #fdd;
    border-radius: 6px;
    font-size: 14px;
}

/* Field-level validation state (inputs keep their own spacing) */
input.cfm-error,
textarea.cfm-error,
select.cfm-error {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.12);
}

input[type="radio"].cfm-error,
input[type="checkbox"].cfm-error {
    outline: 2px solid #dc3232;
    outline-offset: 1px;
    box-shadow: none;
}

/* ============ Alignment lock (beats theme/Elementor overrides) ============ */
.cfm-form-wrapper .ay-contact-card,
.cfm-form-wrapper .ay-contact-card form,
.cfm-form-wrapper .ay-form-section,
.cfm-form-wrapper .ay-field-group,
.cfm-form-wrapper .ay-conditional-wrap,
.cfm-form-wrapper .ay-consent-box {
    text-align: left !important;
}

.cfm-form-wrapper .ay-contact-card > h3 {
    text-align: left !important;
}

/* Section titles: plain left heading, single underline, no theme decoration */
.cfm-form-wrapper .ay-form-section-title {
    display: block !important;
    text-align: left !important;
    width: 100%;
    box-sizing: border-box;
}
.cfm-form-wrapper .ay-form-section-title::before,
.cfm-form-wrapper .ay-form-section-title::after {
    content: none !important;
    display: none !important;
}

/* Labels + helpers */
.cfm-form-wrapper .ay-field-label {
    display: block !important;
    width: 100%;
    text-align: left !important;
}
.cfm-form-wrapper .ay-field-label .required-star {
    display: inline;
    vertical-align: baseline;
}
.cfm-form-wrapper .ay-field-helper {
    text-align: left !important;
}

/* Inputs */
.cfm-form-wrapper .ay-input-text,
.cfm-form-wrapper .ay-textarea {
    display: block;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box !important;
    text-align: left !important;
    margin: 0;
}

/* Radio / checkbox pills: natural width, left-aligned, wrap */
.cfm-form-wrapper .ay-options-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    text-align: left !important;
}
.cfm-form-wrapper .ay-options-grid .ay-option-label {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100%;
    margin: 0 !important;
    justify-content: flex-start !important;
    align-items: center;
    text-align: left !important;
    box-sizing: border-box;
}
.cfm-form-wrapper .ay-option-label input[type="radio"],
.cfm-form-wrapper .ay-option-label input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
}

/* Consent */
.cfm-form-wrapper .ay-consent-label {
    display: flex !important;
    align-items: flex-start;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100%;
}
.cfm-form-wrapper .ay-consent-label input {
    flex: 0 0 auto;
    margin: 3px 0 0 0 !important;
}

/* Submit + feedback */
.cfm-form-wrapper .ay-submit-btn {
    align-self: flex-start;
}
.cfm-form-wrapper #ay-form-feedback {
    text-align: left;
}
