/**
 * TR Fields Block Styles
 * Frontend styles for all TR Fields blocks
 */

/* Contact Form Section */
.contact-form-section {
    padding: 2rem 0;
}

.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.contact-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-form-header h2 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    color: #333;
}

.contact-form-header .subtitle {
    margin: 0;
    color: #666;
    font-size: 1.125rem;
}

/* CR Form Integration Wrapper */
.contact-form-wrapper.cr-form-integrated {
    /* Styles for CR Form Builder integration */
}

/* Static Fallback Form */
.contact-form-wrapper.contact-form-static {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form-static .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-form-static label {
    font-weight: 500;
    color: #333;
}

.contact-form-static .required {
    color: #dc3545;
    margin-left: 0.25rem;
}

.contact-form-static input,
.contact-form-static textarea,
.contact-form-static select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form-static input:focus,
.contact-form-static textarea:focus,
.contact-form-static select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.contact-form-static textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form-static .form-field-submit {
    margin-top: 1rem;
}

.contact-form-static button[type="submit"] {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contact-form-static button[type="submit"]:hover {
    background-color: #005a87;
}

.contact-form-static .form-disclaimer {
    margin: 1rem 0 0;
    font-size: 0.875rem;
    color: #666;
    text-align: center;
}

/* Placeholder state */
.contact-form-placeholder {
    text-align: center;
    padding: 2rem;
    background: #f5f5f5;
    border-radius: 4px;
    color: #666;
}

/* ==========================================================================
   CR AI Form Builder Integration Overrides
   Hide title and mode switcher when embedded in TR Fields blocks
   ========================================================================== */

/* Hide form title when embedded in page blocks */
.contact-form .crf-form-title,
.contact-form-wrapper .crf-form-title,
.quote-form .crf-form-title,
.quote-form__body .crf-form-title,
.quote-card .crf-form-title,
.quote-card__body .crf-form-title,
.lp-form-card .crf-form-title,
.hero__form-wrapper .crf-form-title,
.service-hero .crf-form-title,
.lp-form-section .crf-form-title {
    display: none !important;
}

/* Hide mode switcher button in embedded forms */
.contact-form .crf-mode-switcher,
.contact-form-wrapper .crf-mode-switcher,
.quote-form .crf-mode-switcher,
.quote-form__body .crf-mode-switcher,
.quote-card .crf-mode-switcher,
.quote-card__body .crf-mode-switcher,
.lp-form-card .crf-mode-switcher,
.hero__form-wrapper .crf-mode-switcher,
.service-hero .crf-mode-switcher,
.lp-form-section .crf-mode-switcher {
    display: none !important;
}

/* Style CR Forms to match block designs */
.contact-form .crf-form-container,
.quote-form .crf-form-container,
.quote-card__body .crf-form-container,
.lp-form-card .crf-form-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Form field styling to match Airbnb style */
.crf-form-container .crf-field-group {
    margin-bottom: 1rem;
}

.crf-form-container .crf-field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-primary, #333);
}

.crf-form-container .crf-input,
.crf-form-container .crf-textarea,
.crf-form-container .crf-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border, #ddd);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.crf-form-container .crf-input:focus,
.crf-form-container .crf-textarea:focus,
.crf-form-container .crf-select:focus {
    outline: none;
    border-color: var(--color-primary, #FF385C);
    box-shadow: 0 0 0 2px rgba(255, 56, 92, 0.15);
}

.crf-form-container .crf-submit-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: var(--color-primary, #FF385C);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.crf-form-container .crf-submit-btn:hover {
    background-color: var(--color-primary-dark, #E31C5F);
    transform: translateY(-1px);
}

.crf-form-container .crf-submit-btn:active {
    transform: translateY(0);
}
