/**
 * PFA Forms Styles
 */

/* Form Container */
.pfa-form-wrapper {
    max-width: 100%;
}

.pfa-form {
    margin: 0;
    padding: 0;
}

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

.pfa-form-field.has-error .pfa-form-input,
.pfa-form-field.has-error .pfa-form-input-checkbox {
    border-color: #dc3232;
}

/* Labels */
.pfa-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.pfa-form-label .required {
    color: #dc3232;
    margin-left: 3px;
}

/* Checkbox Labels */
.pfa-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.pfa-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: auto;
}

/* Inputs */
.pfa-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pfa-form-input:focus {
    outline: none;
    border-color: #1a365d;
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.pfa-form-input::placeholder {
    color: #999;
}

.pfa-form-input.pfa-field-error {
    border-color: #dc3232;
    background-color: #fff8f8;
}

/* Textarea */
.pfa-form-field-textarea .pfa-form-input {
    min-height: 150px;
    resize: vertical;
}

/* Select */
.pfa-form-field-select .pfa-form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Submit Button */
.pfa-form-submit {
    display: inline-block;
    padding: 14px 30px;
    background-color: #1a365d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-align: center;
    width: 100%;
    max-width: 250px;
}

.pfa-form-submit:hover {
    background-color: #2c5282;
}

.pfa-form-submit:active {
    transform: scale(0.98);
}

.pfa-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.pfa-form-submit.loading {
    position: relative;
    color: transparent;
}

.pfa-form-submit.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: pfa-spin 0.8s linear infinite;
}

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

/* Messages */
.pfa-form-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.5;
}

.pfa-form-success {
    background-color: #f0fff4;
    border: 1px solid #48bb78;
    color: #22543d;
}

.pfa-form-error {
    background-color: #fff5f5;
    border: 1px solid #f56565;
    color: #742a2a;
}

/* Form Error States */
.pfa-form-field-error {
    position: relative;
}

.has-error .pfa-form-input {
    border-color: #dc3232;
}

/* Responsive */
@media (max-width: 480px) {
    .pfa-form-submit {
        width: 100%;
        max-width: none;
    }
}
