/*
 * Elementor Custom Order Form - Corrected Stylesheet
 * Version: 3.1
 * This file fixes layout and spacing issues.
 */

/* --- Main Form Container --- */
.ecof-form {
    --brand-dark-blue: #0C2E50;
    --brand-orange: #D05501;
    --brand-white: #FFFFFF;
    --field-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --icon-color: #94a3b8;

    /* A simple reset to prevent padding/border from breaking layouts */
    box-sizing: border-box; 
    
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--brand-white);
    padding: clamp(25px, 5vw, 45px); /* Responsive padding */
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(12, 46, 80, 0.08);
    border: 1px solid var(--border-color);
    direction: rtl;
}

.ecof-form *, .ecof-form *:before, .ecof-form *:after {
    box-sizing: inherit; /* Ensure all elements inside the form use border-box */
}

/* --- Layout & Spacing --- */

/* This rule is the most important for vertical spacing. */
/* It adds space *below* each form group. */
.ecof-form-group {
    margin-bottom: 24px;
}

/* This creates the two-column layout. */
.ecof-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 20px; /* The space *between* the columns */
    margin-bottom: 24px; /* Space *below* the entire grid row */
}

/* On small screens, stack the columns on top of each other. */
@media (max-width: 600px) {
    .ecof-grid-container {
        grid-template-columns: 1fr; /* Single column */
    }
}

/* Remove bottom margin from form groups *inside* the grid, as 'gap' handles the spacing. */
.ecof-grid-container .ecof-form-group {
    margin-bottom: 0;
}

/* --- Field & Label Styles --- */

.ecof-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--brand-dark-blue);
}

.ecof-required {
    color: var(--brand-orange);
    margin-right: 4px;
    font-weight: 700;
}

/* Wrapper for inputs that have an icon */
.ecof-input-wrapper {
    position: relative;
}

.ecof-input-icon {
    position: absolute;
    top: 50%;
    right: 15px; /* Position icon on the right for RTL */
    transform: translateY(-50%);
    color: var(--icon-color);
    pointer-events: none;
}
.ecof-input-icon svg {
    width: 18px;
    height: 18px;
}

/* All text inputs and textarea */
.ecof-form-group input[type="text"],
.ecof-form-group input[type="tel"],
.ecof-form-group textarea {
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--field-bg);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    transition: all 0.2s ease-in-out;
}

/* Add space for the icon on inputs that have one */
.ecof-input-wrapper input {
    padding-right: 45px !important; 
}

/* Focus effect */
.ecof-form-group input[type="text"]:focus,
.ecof-form-group input[type="tel"]:focus,
.ecof-form-group textarea:focus {
    outline: none;
    border-color: var(--brand-orange);
    background-color: var(--brand-white);
    box-shadow: 0 0 0 4px rgba(208, 85, 1, 0.1);
}

.ecof-form-group ::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* --- Section Title --- */
.ecof-address-title {
    margin-top: 20px;
    margin-bottom: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    color: var(--brand-dark-blue);
    font-weight: 700;
    font-size: 18px;
}

/* --- Submit Button --- */
.ecof-submit-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(45deg, var(--brand-orange), #ff7e21);
    color: var(--brand-white);
    border: none;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px -5px rgba(208, 85, 1, 0.5);
    transition: all 0.3s ease;
}

.ecof-submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px -5px rgba(208, 85, 1, 0.6);
}

/* --- Modal / Pop-up Styles --- */
.ecof-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    font-family: 'Vazirmatn', sans-serif;
}

.ecof-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    direction: rtl;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.ecof-modal.success .ecof-modal-content { border-top: 5px solid #28a745; }
.ecof-modal.error .ecof-modal-content { border-top: 5px solid #dc3545; }

.ecof-modal-close {
    color: #aaa;
    position: absolute;
    left: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#ecof-modal-message {
    font-size: 18px;
    color: #333;
}
/*
 * Elementor Custom Order Form - Corrected Stylesheet
 * Version: 3.2 (With File Upload)
 * This file fixes layout and spacing issues.
 */

/* --- Main Form Container --- */
.ecof-form {
    --brand-dark-blue: #0C2E50;
    --brand-orange: #D05501;
    --brand-white: #FFFFFF;
    --field-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --icon-color: #94a3b8;

    /* A simple reset to prevent padding/border from breaking layouts */
    box-sizing: border-box; 
    
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--brand-white);
    padding: clamp(25px, 5vw, 45px); /* Responsive padding */
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(12, 46, 80, 0.08);
    border: 1px solid var(--border-color);
    direction: rtl;
}

.ecof-form *, .ecof-form *:before, .ecof-form *:after {
    box-sizing: inherit; /* Ensure all elements inside the form use border-box */
}

/* --- Layout & Spacing --- */

/* This rule is the most important for vertical spacing. */
/* It adds space *below* each form group. */
.ecof-form-group {
    margin-bottom: 24px;
}

/* This creates the two-column layout. */
.ecof-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 20px; /* The space *between* the columns */
    margin-bottom: 24px; /* Space *below* the entire grid row */
}

/* On small screens, stack the columns on top of each other. */
@media (max-width: 600px) {
    .ecof-grid-container {
        grid-template-columns: 1fr; /* Single column */
    }
}

/* Remove bottom margin from form groups *inside* the grid, as 'gap' handles the spacing. */
.ecof-grid-container .ecof-form-group {
    margin-bottom: 0;
}

/* --- Field & Label Styles --- */

.ecof-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--brand-dark-blue);
}

.ecof-required {
    color: var(--brand-orange);
    margin-right: 4px;
    font-weight: 700;
}

/* Wrapper for inputs that have an icon */
.ecof-input-wrapper {
    position: relative;
}

.ecof-input-icon {
    position: absolute;
    top: 50%;
    right: 15px; /* Position icon on the right for RTL */
    transform: translateY(-50%);
    color: var(--icon-color);
    pointer-events: none;
}
.ecof-input-icon svg {
    width: 18px;
    height: 18px;
}

/* All text inputs and textarea */
.ecof-form-group input[type="text"],
.ecof-form-group input[type="tel"],
.ecof-form-group textarea {
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--field-bg);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    transition: all 0.2s ease-in-out;
}

/* Add space for the icon on inputs that have one */
.ecof-input-wrapper input {
    padding-right: 45px !important; 
}

/* Focus effect */
.ecof-form-group input[type="text"]:focus,
.ecof-form-group input[type="tel"]:focus,
.ecof-form-group textarea:focus {
    outline: none;
    border-color: var(--brand-orange);
    background-color: var(--brand-white);
    box-shadow: 0 0 0 4px rgba(208, 85, 1, 0.1);
}

.ecof-form-group ::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* --- Section Title --- */
.ecof-address-title {
    margin-top: 20px;
    margin-bottom: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    color: var(--brand-dark-blue);
    font-weight: 700;
    font-size: 18px;
}

/* --- Submit Button --- */
.ecof-submit-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(45deg, var(--brand-orange), #ff7e21);
    color: var(--brand-white);
    border: none;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px -5px rgba(208, 85, 1, 0.5);
    transition: all 0.3s ease;
}

.ecof-submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px -5px rgba(208, 85, 1, 0.6);
}

/* --- Modal / Pop-up Styles --- */
.ecof-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    font-family: 'Vazirmatn', sans-serif;
}

.ecof-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    direction: rtl;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.ecof-modal.success .ecof-modal-content { border-top: 5px solid #28a745; }
.ecof-modal.error .ecof-modal-content { border-top: 5px solid #dc3545; }

.ecof-modal-close {
    color: #aaa;
    position: absolute;
    left: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#ecof-modal-message {
    font-size: 18px;
    color: #333;
}

/* ==================================
== NEW: File Uploader Styles    ==
==================================
*/
.ecof-file-input-hidden {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.ecof-file-upload-button {
    display: block;
    width: 100%;
    padding: 25px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background-color: var(--field-bg);
    color: var(--brand-dark-blue);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.ecof-file-upload-button:hover,
.ecof-file-input-hidden:focus + .ecof-file-upload-button {
    border-color: var(--brand-orange);
    background-color: var(--brand-white);
    box-shadow: 0 0 0 4px rgba(208, 85, 1, 0.1);
    outline: none;
}

.ecof-file-list {
    margin-top: 15px;
}

.ecof-file-list-item {
    display: block;
    background-color: var(--field-bg);
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    /* Add for long file names */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}