/**
 * WP Advanced Forms - Frontend Styles
 */

/* Form Container */
.wpaf-form-container {
    max-width: 600px;
    margin: 20px 0;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Form Styles */
.wpaf-form {
    display: block;
}

.wpaf-form-fields {
    margin-bottom: 20px;
}

/* Field Styles */
.wpaf-field {
    margin-bottom: 20px;
}

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

.wpaf-field .required {
    color: #dc3232;
    font-weight: bold;
}

.wpaf-field input[type="text"],
.wpaf-field input[type="email"],
.wpaf-field input[type="tel"],
.wpaf-field input[type="url"],
.wpaf-field input[type="number"],
.wpaf-field input[type="date"],
.wpaf-field textarea,
.wpaf-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.wpaf-field input[type="text"]:focus,
.wpaf-field input[type="email"]:focus,
.wpaf-field input[type="tel"]:focus,
.wpaf-field input[type="url"]:focus,
.wpaf-field input[type="number"]:focus,
.wpaf-field input[type="date"]:focus,
.wpaf-field textarea:focus,
.wpaf-field select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.wpaf-field textarea {
    resize: vertical;
    min-height: 120px;
}

.wpaf-field input[type="file"] {
    padding: 8px 0;
}

.wpaf-field small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Checkbox and Radio Styles */
.wpaf-donation-amounts,
.wpaf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wpaf-donation-amounts label,
.wpaf-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.wpaf-donation-amounts input[type="radio"],
.wpaf-checkbox-group input[type="checkbox"] {
    margin-right: 8px;
}

/* Star Rating */
.wpaf-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 30px;
}

.wpaf-star-rating input[type="radio"] {
    display: none;
}

.wpaf-star-rating label {
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s;
    margin: 0 5px;
}

.wpaf-star-rating input[type="radio"]:checked ~ label,
.wpaf-star-rating label:hover,
.wpaf-star-rating label:hover ~ label {
    color: #ffd700;
}

/* Form Actions */
.wpaf-form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wpaf-submit-btn {
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.wpaf-submit-btn:hover {
    background-color: #005a87;
}

.wpaf-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.wpaf-loading {
    font-size: 14px;
    color: #666;
}

/* Messages */
.wpaf-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .wpaf-form-container {
        padding: 20px;
    }
    
    .wpaf-donation-amounts {
        flex-direction: column;
    }
}
