/**
 * Location Contact Form CF7 Integration Styles
 *
 * Styles for Contact Form 7 integration with location contact forms
 * Handles form layout, contact information display, and CF7 compatibility
 *
 * @package WellSpring
 * @since 1.0.0
 * @version 1.3.1
 */

/* Two-column layout */
.wellspring-contact-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ws-spacing-xl, 3rem);
    align-items: center;
}

@media (max-width: 768px) {
    .wellspring-contact-columns {
        grid-template-columns: 1fr;
        gap: var(--ws-spacing-lg, 2rem);
    }
}

/* Contact Form Column (Left) */
.wellspring-contact-form-column {
    width: 100%;
}

/* Contact Info Column (Right) */
.wellspring-contact-info-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--ws-spacing-md, 1.5rem);
}

.wellspring-contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--ws-spacing-md, 1.5rem);
}

/* Contact Info Items with SVG Icons */
.wellspring-contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ws-spacing-sm, 1rem);
}

.wellspring-contact-item svg {
    flex-shrink: 0;
}

.wellspring-contact-item a {
    text-decoration: none;
    transition: var(--ws-transition, all 0.3s ease);
}

.wellspring-contact-info-title {
    font-family: var(--ws-font-family-open-sans, 'Open Sans', sans-serif);
    font-size: var(--ws-font-size-h3, 1.75rem);
    font-weight: var(--ws-font-weight-semibold, 600);
    color: var(--ws-text, #333);
    margin: 0 0 var(--ws-spacing-md, 1.5rem) 0;
    line-height: 1.3;
}

.wellspring-contact-info-items {
    display: flex;
    flex-direction: column;
    gap: var(--ws-spacing-sm, 1rem);
}

.wellspring-contact-info-item {
    font-family: var(--ws-font-family-open-sans, 'Open Sans', sans-serif);
    font-size: var(--ws-font-size-base, 1rem);
    line-height: 1.5;
    color: var(--ws-text, #333);
}

.wellspring-contact-info-item strong {
    color: var(--ws-primary, #0C1C3C);
    font-weight: var(--ws-font-weight-semibold, 600);
}

.wellspring-contact-info-item a {
    color: var(--ws-secondary, #4E7B95);
    text-decoration: none;
    transition: var(--ws-transition, all 0.3s ease);
}

.wellspring-contact-info-item a:hover {
    color: var(--ws-primary, #0C1C3C);
    text-decoration: underline;
}

/* CF7 Form Styles Enhancement */
.wellspring-contact-form {
    margin: 0;
}

.wellspring-contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--ws-spacing-sm, 1rem);
}

.wellspring-contact-form p {
    margin: 0;
}

.wellspring-contact-form label {
    display: block;
}

/* CF7 Form Fields */
.wellspring-contact-form .wpcf7-form-control:not(.wpcf7-submit) {
    width: 100%;
    transition: var(--ws-transition, all 0.3s ease);
}

.wellspring-contact-form .wpcf7-form-control:not(.wpcf7-submit):focus {
    outline: none;
}

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

/* Name Fields Layout */
.wellspring-contact-form .name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ws-spacing-sm, 1rem);
}

@media (max-width: 480px) {
    .wellspring-contact-form .name-fields {
        grid-template-columns: 1fr;
    }
}

/* CF7 Submit Button */
.wellspring-contact-form .wpcf7-submit {
    align-self: flex-start;
    margin-top: var(--ws-spacing-sm, 1rem);
    border: 0;
}

.wellspring-contact-form .wpcf7-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wellspring-contact-form .wpcf7-submit:active {
    transform: translateY(0);
}

/* CF7 Response Messages */
.wellspring-contact-form .wpcf7-response-output {
    margin: var(--ws-spacing-sm, 1rem) 0 0 0;
    padding: var(--ws-spacing-sm, 1rem);
    border-radius: var(--ws-border-radius-small, 4px);
    font-family: var(--ws-font-family-open-sans, 'Open Sans', sans-serif);
    font-size: var(--ws-font-size-sm, 0.875rem);
}

.wellspring-contact-form .wpcf7-mail-sent-ok {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wellspring-contact-form .wpcf7-mail-sent-ng,
.wellspring-contact-form .wpcf7-validation-errors {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.wellspring-contact-form .wpcf7-spam-blocked {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* CF7 Validation Errors */
.wellspring-contact-form .wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: var(--ws-font-size-xs, 0.75rem);
    margin-top: var(--ws-spacing-xs, 0.5rem);
    display: block;
}

.wellspring-contact-form .wpcf7-not-valid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

/* CF7 Spinner */
.wellspring-contact-form .wpcf7-spinner {
    margin: 0 var(--ws-spacing-xs, 0.5rem);
    vertical-align: middle;
}

/* Hidden Fields Container */
.wellspring-contact-form .hidden-fields-container {
    display: none;
}

/* Screen Reader Support */
.wellspring-contact-form .screen-reader-response {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Elementor Editor Alerts */
.elementor-alert {
    padding: var(--ws-spacing-sm, 1rem);
    margin: var(--ws-spacing-sm, 1rem) 0;
    border-radius: var(--ws-border-radius-small, 4px);
    font-family: var(--ws-font-family-open-sans, 'Open Sans', sans-serif);
    font-size: var(--ws-font-size-sm, 0.875rem);
    line-height: 1.4;
}

.elementor-alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.elementor-alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wellspring-location-contact {
        gap: var(--ws-spacing-lg, 2rem);
    }
    
    .wellspring-contact-form,
    .location-contact-info {
        padding: var(--ws-spacing-md, 1.5rem);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wellspring-contact-info-column {
        order: -1; /* Show contact info above form on mobile */
    }
}

@media (max-width: 480px) {
    .wellspring-contact-form,
    .location-contact-info {
        padding: var(--ws-spacing-sm, 1rem);
    }
    
    .contact-form-title,
    .wellspring-contact-info-title {
        font-size: var(--ws-font-size-h4, 1.5rem);
    }
}