/**
 * WP FloorMap — Contact Form Block (Frontend Styles)
 *
 * Design language: matches the plugin's modal / waitlist aesthetic —
 * warm neutral inputs, theme-color accents, clean typography.
 */

/* ------------------------------------------------------------------
   Container
   ------------------------------------------------------------------ */

.wpfm-contact-form-block {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.5;
    box-sizing: border-box;
}

.wpfm-contact-form-block *,
.wpfm-contact-form-block *::before,
.wpfm-contact-form-block *::after {
    box-sizing: inherit;
}

/* ------------------------------------------------------------------
   Title
   ------------------------------------------------------------------ */

.wpfm-cf-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    line-height: 1.25 !important;
}

/* ------------------------------------------------------------------
   Context badge (unit / floor plan pill)
   ------------------------------------------------------------------ */

.wpfm-cf-context {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--wpfm-theme-color, #333);
    background: var(--wpfm-theme-color-light, rgba(0,0,0,0.06));
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    padding: 6px 13px 6px 10px;
    margin-bottom: 20px;
    width: fit-content;
    line-height: 1.4;
}

.wpfm-cf-context[style*="display: flex"],
.wpfm-cf-context[style*="display:flex"] {
    display: inline-flex !important;
}

.wpfm-cf-context-icon {
    flex-shrink: 0;
    opacity: 0.75;
    margin-top: -1px;
}

.wpfm-cf-context strong {
    font-weight: 600;
}

/* ------------------------------------------------------------------
   Form & field grid
   ------------------------------------------------------------------ */

.wpfm-cf-form {
    margin: 0;
    padding: 0;
}

.wpfm-cf-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.wpfm-cf-field-half {
    grid-column: auto;
}

.wpfm-cf-field-full {
    grid-column: 1 / -1;
}

/* ------------------------------------------------------------------
   Labels
   ------------------------------------------------------------------ */

.wpfm-cf-label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #6b7280 !important;
    margin-bottom: 6px !important;
    padding: 0 !important;
}

.wpfm-cf-required {
    color: #d63638;
    margin-left: 2px;
}

/* ------------------------------------------------------------------
   Inputs & textarea
   ------------------------------------------------------------------ */

.wpfm-cf-input {
    display: block !important;
    width: 100% !important;
    padding: 11px 14px !important;
    border: 1px solid var(--wpfm-theme-color-light, #d8d0c8) !important;
    border-radius: 8px !important;
    background: color-mix(in srgb, var(--wpfm-theme-color, #bfb5ab) 5%, #fff) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.45 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    margin: 0 !important;
    resize: none;
}

.wpfm-cf-input::placeholder {
    color: #b4a99f !important;
}

.wpfm-cf-input:hover {
    border-color: color-mix(in srgb, var(--wpfm-theme-color, #bfb5ab) 40%, #bfb5ab) !important;
}

.wpfm-cf-input:focus {
    outline: none !important;
    border-color: var(--wpfm-theme-color, #333) !important;
    background: color-mix(in srgb, var(--wpfm-theme-color, #bfb5ab) 3%, #fff) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 3px var(--wpfm-theme-color-light, rgba(0,0,0,0.08)) !important;
}

.wpfm-cf-input.wpfm-cf-input-error {
    border-color: #d63638 !important;
    background: #fff5f5 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 3px rgba(214,54,56,0.10) !important;
}

.wpfm-cf-textarea {
    min-height: 110px !important;
    resize: vertical !important;
}

/* ------------------------------------------------------------------
   Checkbox field
   ------------------------------------------------------------------ */

.wpfm-cf-checkbox-label {
    display: inline-flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.45 !important;
    padding: 2px 0 !important;
}

.wpfm-cf-checkbox {
    flex-shrink: 0 !important;
    width: 17px !important;
    height: 17px !important;
    margin: 2px 0 0 !important;
    border: 1.5px solid var(--wpfm-theme-color-light, #d8d0c8) !important;
    border-radius: 4px !important;
    background: color-mix(in srgb, var(--wpfm-theme-color, #bfb5ab) 5%, #fff) !important;
    cursor: pointer !important;
    accent-color: var(--wpfm-theme-color, #333) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}

.wpfm-cf-checkbox.wpfm-cf-input-error {
    outline: 2px solid #d63638 !important;
    outline-offset: 1px !important;
}

/* ------------------------------------------------------------------
   Radio group
   ------------------------------------------------------------------ */

.wpfm-cf-radio-fieldset {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
}

.wpfm-cf-radio-fieldset > .wpfm-cf-label {
    margin-bottom: 8px !important;
}

.wpfm-cf-radio-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.wpfm-cf-radio-group.wpfm-cf-radio-error .wpfm-cf-radio {
    outline: 2px solid #d63638 !important;
    outline-offset: 1px !important;
}

.wpfm-cf-radio-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #333 !important;
    line-height: 1.4 !important;
}

.wpfm-cf-radio {
    flex-shrink: 0 !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    cursor: pointer !important;
    accent-color: var(--wpfm-theme-color, #333) !important;
}

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

.wpfm-cf-submit-wrap {
    margin-top: 4px;
}

.wpfm-cf-submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 28px !important;
    background: var(--wpfm-theme-color, #333) !important;
    color: #fff !important;
    border: 2px solid var(--wpfm-theme-color, #333) !important;
    border-radius: 8px !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-height: 48px !important;
}

.wpfm-cf-submit:hover {
    background: var(--wpfm-theme-color-light, rgba(0,0,0,0.08)) !important;
    color: var(--wpfm-theme-color, #333) !important;
}

.wpfm-cf-submit:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* ------------------------------------------------------------------
   Form-level error
   ------------------------------------------------------------------ */

.wpfm-cf-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 13px;
    color: #991b1b;
    line-height: 1.4;
}

/* ------------------------------------------------------------------
   Success state
   ------------------------------------------------------------------ */

.wpfm-cf-success {
    display: none;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    font-size: 15px;
    color: #166534;
    line-height: 1.5;
}

.wpfm-cf-success svg {
    flex-shrink: 0;
    margin-top: 1px;
    stroke: #16a34a;
}

/* ------------------------------------------------------------------
   Responsive — collapse to single column on narrow viewports
   ------------------------------------------------------------------ */

@media (max-width: 540px) {
    .wpfm-cf-fields {
        grid-template-columns: 1fr;
    }

    .wpfm-cf-field-half,
    .wpfm-cf-field-full {
        grid-column: auto;
    }

    .wpfm-cf-submit {
        width: 100% !important;
    }
}
