/* Base styles */
.form-table-container {
    width: 100%;
    margin: 20px 0;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
}

.form-row {
    border-bottom: 1px solid #f0f0f0;
}

.form-label-cell {
    padding: 4px 8px;
    width: 140px; /* Adjust based on your design */
    vertical-align: middle;
}

.form-input-cell {
    padding: 4px 8px;
    vertical-align: middle;
}

.form-input-cell .chosen-container{
    width: 410px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.form-required {
    color: #e74c3c;
}

.form-input-container {
    margin-bottom: 0px;
}

.form-input,
.form-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-select {
    width: 410px;
    height: 40px;
}

.form-textarea {
    width: 400px;
    height: 60px;;
}

.form-input {
    height: 25px;
}

.form-input:focus,
.form-select:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Select dropdown styling */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 32px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .form-table tbody,
    .form-row,
    .form-label-cell,
    .form-input-cell {
        display: block;
        width: 100%;
    }

    .form-table{
        width: 97%;
    }

    .form-row {
        margin-bottom: 0px;
        padding-bottom: 0px;
        border-bottom: 1px solid #eee;
    }

    .form-label-cell,
    .form-input-cell {
        padding: 3px 0;
    }

    .form-label {
        margin-bottom: 0px;
        font-size: 15px; /* Slightly larger for mobile */
    }

    .form-input,
    .form-select {
        padding: 12px 10px;
        font-size: 16px; /* Larger for better touch */
        width: 100% !important;
    }

    .form-textarea {
        width: 98%;
    }

    .form-input-cell .chosen-container{
        width: 100%;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .form-input-container {
        margin-bottom: 12px;
    }
    
    .form-row {
        margin-bottom: 0px;
    }

    .form-input-cell .chosen-container{
        width: 100%;
    }

    .form-input,
    .form-select,
    .form-select-multi {
        width: 100% !important;
    }

    .form-container fieldset{
        width: 97% !important;
    }

    .form-textarea {
        width: 98%;
    }
}