/**
 * Clean Form Styles - Simple and Professional
 * Light theme with horizontal layout and user-friendly design
 */

/* Form Container */
.quote-form-container {
    background: #ffffff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8ecf0;
    max-width: 900px;
    margin: 0 auto;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-title i {
    color: #54af32;
    font-size: 28px;
}

.form-subtitle {
    font-size: 16px;
    color: #6c757d;
    font-weight: 400;
}

/* Form Grid Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-row.single {
    grid-template-columns: 1fr;
}

/* Form Groups */
.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-label .optional {
    color: #95a5a6;
    font-size: 12px;
    font-weight: 400;
    margin-left: 5px;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8ecf0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #54af32;
    box-shadow: 0 0 0 3px rgba(84, 175, 50, 0.1);
    background: #ffffff;
}

.form-control::placeholder {
    color: #95a5a6;
    font-weight: 400;
}

/* Select Styling */
select.form-control {
    cursor: pointer;
    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='%2354af32' 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: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select.form-control option {
    padding: 10px;
    background: #ffffff;
    color: #2c3e50;
}

/* Textarea */
textarea.form-control {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #54af32 0%, #45a028 100%);
    color: #ffffff;
    border: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #45a028 0%, #3d8f23 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(84, 175, 50, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn i {
    font-size: 18px;
}

/* Loading State */
.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Messages */
.form-messages {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    display: none;
    align-items: center;
    gap: 10px;
}

.form-messages.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: flex;
}

.form-messages.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: flex;
}

.form-messages i {
    font-size: 18px;
    flex-shrink: 0;
}

/* Form Validation States */
.form-control.is-valid {
    border-color: #28a745;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

/* Field Icons */
.form-group.has-icon {
    position: relative;
}

.form-group.has-icon .field-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 16px;
    pointer-events: none;
    margin-top: 12px;
}

.form-group.has-icon .form-control:focus + .field-icon {
    color: #54af32;
}

.form-group.has-icon .form-control {
    padding-right: 45px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quote-form-container {
        padding: 25px 20px;
        margin: 0 15px;
        border-radius: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .submit-btn {
        padding: 14px 30px;
        font-size: 15px;
    }
    
    .form-title {
        font-size: 20px;
    }
    
    .form-messages {
        padding: 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .quote-form-container {
        padding: 20px 15px;
    }
    
    .form-label {
        font-size: 13px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 15px;
    }
}

/* Print Styles */
@media print {
    .quote-form-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .submit-btn {
        background: #000 !important;
        color: #fff !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .submit-btn {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
