/* =========================================
   1. SHENFORM CONTAINER
   ========================================= */
.shenform-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif, Helvetica, Arial;
    box-sizing: border-box;
}

.shenform-wrapper * {
    box-sizing: border-box;
}

/* 
   GRID SYSTEM FIX (இடைவெளிக்கான தீர்வு)
   மைனஸ் மார்ஜின் கொடுப்பதன் மூலம், ஓரங்களில் இடைவெளி வராமல் தடுக்கும்
*/
.shenform-wrapper form {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

/* =========================================
   2. ELEMENTOR WIDGET SPACING (முக்கியம்)
   ========================================= */
/* 
   ஒவ்வொரு ஃபீல்டுக்கும் இடது மற்றும் வலது பக்கம் 10px இடைவெளி கொடுக்கிறோம்.
   மொத்தமாக 20px இடைவெளி கிடைக்கும்.
*/
.elementor-widget-shenform_input,
.elementor-widget-shenform_submit {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px; /* கீழ் இடைவெளி */
}

/* =========================================
   3. LABELS
   ========================================= */
.shenform-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
}

/* =========================================
   4. INPUT FIELDS
   ========================================= */
.shenform-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    min-height: 48px;
}

.shenform-input:focus {
    border-color: #ff4a57;
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 74, 87, 0.2);
}

textarea.shenform-input {
    min-height: 120px;
    resize: vertical;
    padding-top: 12px;
}

/* =========================================
   5. DROPDOWN / SELECT FIX
   ========================================= */
.shenform-wrapper select.shenform-input {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 48px;
    padding: 10px 15px !important;
    background-color: #f9f9f9 !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    appearance: auto !important; 
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    z-index: 10;
    cursor: pointer;
}

.shenform-wrapper .nice-select { display: none !important; }

/* =========================================
   6. RADIO & CHECKBOXES
   ========================================= */
.shenform-field-wrapper input[type="radio"],
.shenform-field-wrapper input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
    display: inline-block;
    cursor: pointer;
    transform: scale(1.1);
    vertical-align: middle;
}

.shenform-field-wrapper label {
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    vertical-align: middle;
    display: inline-block;
    margin-bottom: 5px;
}

/* =========================================
   7. FILE UPLOAD
   ========================================= */
.shenform-input[type="file"] {
    padding: 10px;
    background: #fff;
    line-height: 1.2;
}

/* =========================================
   8. SUBMIT BUTTON
   ========================================= */
.shenform-submit-wrapper {
    width: 100%;
    clear: both;
}

.shenform-submit-btn {
    background-color: #ff4a57;
    color: #fff;
    padding: 14px 40px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    min-width: 180px;
}

.shenform-submit-btn:hover {
    background-color: #e04350;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 74, 87, 0.3);
}

.shenform-submit-btn:disabled,
.shenform-submit-btn.disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.7;
}

/* =========================================
   9. MESSAGES
   ========================================= */
.shen-form-response {
    margin-top: 20px;
    font-size: 15px;
    font-weight: 500;
    width: 100%;
}

/* =========================================
   10. MOBILE RESPONSIVE FIX (Corrected)
   ========================================= */
@media only screen and (max-width: 767px) {
    
    /* 
       இங்கே display: block !important; என்பதை நீக்கிவிட்டேன்.
       அதனால் JS மறைக்கும்போது (hide) அது சரியாக மறையும்.
    */
    .elementor-widget-shenform_input,
    .elementor-widget-shenform_submit {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important; /* மொபைலில் பக்கவாட்டு இடைவெளி தேவையில்லை */
        padding-right: 0 !important;
    }

    /* உள்ளே இருக்கும் ஃபீல்டு */
    .shenform-field-wrapper {
        width: 100% !important;
    }

    .shenform-submit-btn {
        width: 100% !important;
        display: block;
    }
    
    /* ஏற்கனவே உள்ள CSS உடன் இதைச் சேர்க்கவும் */

/* Required Star */
.shenform-required-star {
    color: red;
    font-weight: bold;
    margin-left: 3px;
}

/* Error Message */
.shen-error-text {
    color: #dc3545; /* சிவப்பு */
    font-size: 13px;
    margin-top: 5px;
    display: none; /* JS இதை ஆன் செய்யும் */
}

/* Error Input Border */
.shenform-input.shen-error {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
}
}