/**
 * RFQ Form Styles
 */

.rfq-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    border-left: 4px solid;
}

.rfq-form-wrapper h2 {
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #333;
}

.rfq-form-description {
    color: #666;
    margin: 0 0 30px 0;
    font-size: 16px;
}

.rfq-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.rfq-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.rfq-error-message ul {
    margin: 0;
    padding-left: 20px;
}

.rfq-form {
    background: transparent;
}

.rfq-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.rfq-form-field {
    flex: 1;
    min-width: 0;
}

.rfq-form-field-full {
    flex-basis: 100%;
}

.rfq-form-field-half {
    flex-basis: calc(50% - 10px);
}

.rfq-form-field label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: normal;
}

.rfq-form-field label .required {
    color: #e74c3c;
}

.rfq-form-field input[type="text"],
.rfq-form-field input[type="email"],
.rfq-form-field select,
.rfq-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.rfq-form-field input[type="text"]:focus,
.rfq-form-field input[type="email"]:focus,
.rfq-form-field select:focus,
.rfq-form-field textarea:focus {
    outline: none;
    border-color: #999;
}

.rfq-form-field input::placeholder,
.rfq-form-field textarea::placeholder {
    color: #999;
}

.rfq-form-field select {
    cursor: pointer;
    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 10px center;
    background-size: 20px;
    padding-right: 35px;
}

/* Select2 custom styles */
.rfq-form-field .select2-container {
    width: 100% !important;
}

.rfq-form-field .select2-container--default .select2-selection--single {
    border: 1px solid #ddd;
    border-radius: 0;
    height: 42px;
    padding: 10px 12px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
}

.rfq-form-field .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 22px;
    color: #333;
    padding-left: 0;
    padding-right: 0;
    font-family: inherit;
    font-size: 14px;
}

.rfq-form-field .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999;
}

.rfq-form-field .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    right: 5px;
}

.rfq-form-field .select2-container--default.select2-container--disabled .select2-selection--single {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 0;
    font-family: inherit;
    font-size: 14px;
}

.select2-container--default .select2-results__option {
    font-family: inherit;
    font-size: 14px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #333;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ddd;
    border-radius: 0;
    font-family: inherit;
    font-size: 14px;
}

.rfq-form-field textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.rfq-submit-button {
    background: #333;
    color: #fff;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.rfq-submit-button:hover {
    background: #555;
}

/* Recent Submissions Table */
.rfq-recent-submissions {
    max-width: 800px;
    margin: 40px auto 0;
    padding: 20px;
    border-left: 4px solid;
}

.rfq-recent-submissions h2 {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #333;
}

.rfq-recent-description {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.rfq-submissions-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.rfq-submissions-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.rfq-submissions-table tbody tr:last-child {
    border-bottom: none;
}

.rfq-submissions-table td {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
}

.rfq-submissions-table td.rfq-quote-title {
    font-weight: normal;
    width: 60%;
}

.rfq-submissions-table td.rfq-submitter-name {
    text-align: right;
    color: #666;
    width: 40%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rfq-form-wrapper {
        padding: 15px;
    }
    
    .rfq-recent-submissions {
        padding: 15px;
        margin-top: 30px;
    }
    
    .rfq-recent-submissions h2 {
        font-size: 20px;
    }
    
    .rfq-submissions-table td {
        padding: 10px;
        font-size: 13px;
    }
    
    .rfq-submissions-table td.rfq-quote-title {
        width: 55%;
    }
    
    .rfq-submissions-table td.rfq-submitter-name {
        width: 45%;
    }
    
    .rfq-form-wrapper h2 {
        font-size: 24px;
    }
    
    .rfq-form-description {
        font-size: 14px;
    }
    
    .rfq-form-row {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .rfq-form-field-half {
        flex-basis: 100%;
    }
    
    .rfq-submit-button {
        width: 100%;
    }
}

/* Modal Styles */
.rfq-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.rfq-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.rfq-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
}

.rfq-modal-close:hover,
.rfq-modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.rfq-modal-content h3 {
    margin-top: 0;
    color: #d9534f;
}

.rfq-modal-content p {
    margin-bottom: 0;
}

/* Turnstile Field */
.rfq-turnstile-field {
    margin-bottom: 20px;
}

.rfq-turnstile-field .cf-turnstile {
    display: inline-block;
}

@media (max-width: 768px) {
    .rfq-modal-content {
        width: 90%;
        margin: 30% auto;
    }
}
