/* =======================================================
   BOX INTERIORS - CONTACT FORM
   ======================================================= */

.bi-form-wrapper {
    width: 100%;
    font-family: var(--e-global-typography-primary-font-family), "AeonikPro", sans-serif;
}

.bi-form-title {
    font-size: 50px;
    font-weight: 400;
    margin-bottom: 50px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
}

/* --- THE GRID ENGINE --- */
.bi-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 60px; /* Controlled by Elementor slider */
    row-gap: 30px;    /* Controlled by Elementor slider */
}

/* --- EXACT PLACEMENT --- */
.bi-field-name  { grid-column: 1; grid-row: 1; }
.bi-field-email { grid-column: 1; grid-row: 2; }
.bi-field-subj  { grid-column: 1; grid-row: 3; }

/* The Textarea spans Rows 1 and 2 perfectly */
.bi-field-msg { 
    grid-column: 2; 
    grid-row: 1 / 3; 
}

/* The Button aligns perfectly next to Subject (Row 3) */
.bi-submit-container { 
    grid-column: 2; 
    grid-row: 3; 
    display: flex;
    align-items: flex-end; /* Anchors button to bottom border baseline */
}

/* --- INPUT STYLING --- */
.bi-field-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Pushes content to bottom line */
}

.bi-field-group input, 
.bi-field-group textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid #d1d1d1;
    background: transparent;
    padding: 10px 0; /* Default, overridden by Elementor */
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    color: #000;
}

/* Textarea specific */
.bi-field-group textarea {
    resize: none;
    height: 100%;
}

/* --- PLACEHOLDER TYPOGRAPHY --- */
.bi-field-group input::placeholder, 
.bi-field-group textarea::placeholder {
    color: #000; /* Fallback, overridden by Elementor */
    opacity: 1;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
    font-family: inherit;
}

/* --- BUTTON STYLING --- */
.bi-submit-btn {
    background: #000000 !important;
    color: #ffffff !important;
    border: none;
    border-radius: 0 !important;
    padding: 15px 30px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s ease;
    width: auto;
}

.bi-submit-btn:hover {
    opacity: 0.8;
}

.bi-submit-btn:disabled,
.bi-submit-btn.bi-btn--loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- RESPONSE MESSAGES --- */
.bi-form-response {
    margin-top: 15px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 16px;
    display: none;
}

.bi-form-response.bi-response--success {
    color: #1a6e3c;
    background-color: #eaf5ee;
    border-left: 3px solid #1a6e3c;
}

.bi-form-response.bi-response--error {
    color: #b01d1d;
    background-color: #fdf0f0;
    border-left: 3px solid #b01d1d;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .bi-grid-layout {
        grid-template-columns: 1fr;
        row-gap: 20px !important;
    }
    /* Reset Grid Placements to naturally stack */
    .bi-field-name, 
    .bi-field-email, 
    .bi-field-subj, 
    .bi-field-msg, 
    .bi-submit-container { 
        grid-column: 1; 
        grid-row: auto; 
    }
    
    /* Give textarea a fixed height on mobile */
    .bi-field-msg { 
        height: 150px; 
    }
}