/**
 * IWC RFS Form Styles
 * Frontend form styling for the Request for Services plugin
 */

/* Container and Layout */
.rfs-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rfs-form-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.rfs-form-intro {
    background: #e8f4fd;
    border: 1px solid #3498db;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.5;
}

.rfs-form-intro p {
    margin: 0;
    color: #2980b9;
}

/* Messages */
.rfs-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
}

.rfs-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.rfs-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Form Sections */
.rfs-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.rfs-contact-section {
    background: #fff5e6;
    border-left: 4px solid #f39c12;
}

.rfs-submit-section {
    background: #e8f5e8;
    border-left: 4px solid #27ae60;
    text-align: center;
}

.rfs-section-title {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f39c12;
}

/* Labels and Descriptions */
.rfs-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
}

.rfs-sublabel {
    display: block;
    font-weight: 500;
    color: #34495e;
    margin-bottom: 5px;
    font-size: 14px;
}

.rfs-required {
    color: #e74c3c;
    font-weight: bold;
}

.rfs-field-description {
    background: #ffffff;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
    font-style: italic;
}

/* Form Inputs */
.rfs-input,
.rfs-textarea,
.rfs-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.rfs-input:focus,
.rfs-textarea:focus,
.rfs-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.rfs-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.rfs-select {
    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='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: 16px;
    padding-right: 40px;
}

/* Date Fields */
.rfs-date-fields {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.rfs-date-field {
    flex: 1;
    min-width: 200px;
}

.rfs-date-input {
    width: 100%;
}

/* Contact Fields */
.rfs-contact-fields {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.rfs-contact-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rfs-contact-row:last-child {
    margin-bottom: 0;
}

.rfs-contact-field {
    flex: 1;
    min-width: 250px;
}

.rfs-contact-field-full {
    flex: 1 1 100%;
    min-width: 100%;
}

/* Submit Button */
.rfs-submit-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.rfs-submit-btn:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.rfs-submit-btn:active {
    transform: translateY(0);
}

.rfs-required-note {
    margin-bottom: 20px;
    color: #7f8c8d;
    font-size: 13px;
}

/* Validation States */
.rfs-input:invalid,
.rfs-textarea:invalid,
.rfs-select:invalid {
    border-color: #e74c3c;
}

.rfs-input:valid,
.rfs-textarea:valid,
.rfs-select:valid {
    border-color: #27ae60;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rfs-form-container {
        margin: 0 10px;
        padding: 15px;
    }
    
    .rfs-form-title {
        font-size: 24px;
    }
    
    .rfs-form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .rfs-date-fields {
        flex-direction: column;
        gap: 15px;
    }
    
    .rfs-date-field {
        min-width: 100%;
    }
    
    .rfs-contact-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .rfs-contact-field {
        min-width: 100%;
    }
    
    .rfs-submit-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .rfs-form-container {
        margin: 0 5px;
        padding: 10px;
    }
    
    .rfs-form-section {
        padding: 10px;
    }
    
    .rfs-contact-fields {
        padding: 15px;
    }
    
    .rfs-field-description {
        font-size: 12px;
        padding: 8px;
    }
}

/* Loading State (for future use) */
.rfs-form.rfs-loading {
    opacity: 0.7;
    pointer-events: none;
}

.rfs-form.rfs-loading .rfs-submit-btn {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Print Styles */
@media print {
    .rfs-form-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .rfs-submit-btn {
        display: none;
    }
    
    .rfs-form-intro {
        background: transparent;
        border: 1px solid #ccc;
    }
}