/**
 * Frontend styles for Zyloform AI WP Form Builder
 *
 * @package Zyloform_AI_WP_Form_Builder
 */

/* Form Container */
.zyloform-form-container {
    max-width: 100%;
    margin: 0 auto 30px;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Form Title */
.zyloform-form-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    color: #333333;
}

/* Form Fields */
.zyloform-form-field {
    margin-bottom: 20px;
}

.zyloform-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333333;
}

.zyloform-form-field label .required {
    color: #e32;
    margin-left: 4px;
}

.zyloform-form-field input[type="text"],
.zyloform-form-field input[type="email"],
.zyloform-form-field input[type="tel"],
.zyloform-form-field input[type="number"],
.zyloform-form-field input[type="url"],
.zyloform-form-field input[type="password"],
.zyloform-form-field textarea,
.zyloform-form-field select {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.zyloform-form-field input:focus,
.zyloform-form-field textarea:focus,
.zyloform-form-field select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

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

/* Radio and Checkbox Fields */
.zyloform-radio-options,
.zyloform-checkbox-options {
    margin-top: 5px;
}

.zyloform-radio-option,
.zyloform-checkbox-option {
    margin-bottom: 8px;
}

.zyloform-radio-option label,
.zyloform-checkbox-option label {
    display: inline;
    font-weight: normal;
    margin-left: 8px;
    cursor: pointer;
}

/* Help Text */
.zyloform-help-text {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Submit Button */
.zyloform-submit-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.zyloform-submit-button:hover {
    background-color: #005a87;
}

.zyloform-submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.3);
}

/* Form Messages */
.zyloform-message {
    padding: 12px 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 15px;
}

.zyloform-success-message {
    background-color: #dff0d8;
    color: #3c763d;
    border-left: 4px solid #5cb85c;
}

.zyloform-error-message {
    background-color: #f2dede;
    color: #a94442;
    border-left: 4px solid #d9534f;
}

/* Form Validation */
.zyloform-form-field.has-error input,
.zyloform-form-field.has-error textarea,
.zyloform-form-field.has-error select {
    border-color: #d9534f;
}

.zyloform-validation-error {
    color: #d9534f;
    font-size: 13px;
    margin-top: 5px;
}

/* Loading Indicator */
.zyloform-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid rgba(0, 115, 170, 0.3);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: zyloform-spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes zyloform-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media screen and (max-width: 600px) {
    .zyloform-form-container {
        padding: 15px;
    }
    
    .zyloform-form-title {
        font-size: 20px;
    }
    
    .zyloform-form-field input,
    .zyloform-form-field textarea,
    .zyloform-form-field select {
        font-size: 14px;
        padding: 8px 10px;
    }
    
    .zyloform-submit-button {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
    }
}