/* 
 * Custom Form Layout CSS
 * Transforms Elementor forms to match design layouts
 */

/* Custom Form Flexbox Layout - Perfect Design Match */
.custom-form-layout .elementor-form-fields-wrapper {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
}

/* Main form content area */
.custom-form-layout .form-main-content {
    display: flex !important;
    gap: 40px;
    align-items: stretch;
}

/* Left column containing first 5 fields */
.custom-form-layout .form-left-column {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    gap: 20px;
}

/* Right column containing message field and submit button */
.custom-form-layout .form-right-column {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    gap: 20px;
}

/* Message field group fills available space */
.custom-form-layout .form-right-column .elementor-field-group:first-child {
    flex: 1;
    display: flex !important;
    flex-direction: column;
}

/* Message field fills the full height */
.custom-form-layout .form-right-column .elementor-field {
    height: 100% !important;
    min-height: 200px !important;
    resize: vertical;
    flex: 1;
}

/* Submit button area at bottom of right column */
.custom-form-layout .form-submit-area {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Message field styling - spans full right column height */
.custom-form-layout .elementor-field-group:nth-child(6) {
    align-self: start;
}

.custom-form-layout .elementor-field-group:nth-child(6) .elementor-field {
    min-height: 200px !important;
    height: 100%;
    resize: vertical;
}

/* Submit button with arrow icon */
.custom-form-layout .elementor-field-group-submit {
    text-align: right;
    display: flex;
    justify-content: flex-end;
}

.custom-form-layout .elementor-field-group-submit .elementor-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Add arrow icon to submit button */
.custom-form-layout .elementor-field-group-submit .elementor-button::after {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2040' height='2040' viewBox='0 0 2040 2040'%3E%3Cpath d='m1020,1597.37c23.49,0,42.5-19.01,42.5-42.5v-1002.4l437.45,437.45c16.6,16.6,43.5,16.6,60.1,0,16.6-16.6,16.6-43.5,0-60.1l-449.9-449.9c-49.64-49.72-130.65-49.72-180.29,0l-449.9,449.9c-16.6,16.6-16.6,43.5,0,60.1s43.5,16.6,60.1,0l437.45-437.45v1002.4c0,23.49,19.01,42.5,42.5,42.5Z' fill='%23000000'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(45deg);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.custom-form-layout .elementor-field-group-submit .elementor-button:hover::after {
    opacity: 1;
    transform: rotate(45deg) translate(2px, -2px);
}

/* Message field styling */
.custom-form-layout .elementor-field-group-message .elementor-field {
    height: 100%;
    min-height: 250px;
    resize: vertical;
}

/* Submit button styling */
.custom-form-layout .elementor-field-group-submit .elementor-button {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Responsive layout */
@media (max-width: 768px) {
    /* Stack columns vertically on mobile */
    .custom-form-layout .form-main-content {
        flex-direction: column !important;
        gap: 20px;
    }
    
    /* Left column keeps normal spacing */
    .custom-form-layout .form-left-column {
        gap: 20px;
    }
    
    /* Right column adjusts for mobile */
    .custom-form-layout .form-right-column {
        gap: 20px;
    }
    
    /* Message field has normal height on mobile */
    .custom-form-layout .form-right-column .elementor-field {
        min-height: 120px !important;
    }
    
    /* Submit button centered on mobile */
    .custom-form-layout .form-submit-area {
        justify-content: center;
    }
}

/* Field styling consistency */
.custom-form-layout .elementor-field {
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    padding: 10px 0;
    background: transparent;
    transition: border-color 0.3s ease;
}

.custom-form-layout .elementor-field:focus {
    border-bottom-color: #000;
    outline: none;
}

.custom-form-layout .elementor-field-label {
    font-weight: normal;
    color: #666;
    margin-bottom: 5px;
}