/* PF Forms Frontend Styles */

.pf-forms-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pf-forms-title {
    font-size: 2em;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.pf-forms-subtitle {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

.pf-forms-form {
    margin-bottom: 30px;
}

.pf-forms-field {
    margin-bottom: 20px;
}

.pf-forms-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.pf-forms-field input[type="text"],
.pf-forms-field input[type="email"],
.pf-forms-field select,
.pf-forms-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.pf-forms-field input[type="text"]:focus,
.pf-forms-field input[type="email"]:focus,
.pf-forms-field select:focus,
.pf-forms-field textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary, #007cba);
    box-shadow: 0 0 0 1px var(--wp--preset--color--primary, #007cba);
}

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

.pf-forms-field select {
    cursor: pointer;
}


.required {
    color: #e74c3c;
}

/* File Upload Styles */
.pf-forms-file-upload {
    position: relative;
}

.pf-forms-file-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.pf-forms-file-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.pf-forms-file-input-wrapper:hover {
    border-color: var(--wp--preset--color--primary, #007cba);
}

.pf-forms-file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.pf-forms-file-button {
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pf-forms-file-name {
    color: #666;
    font-style: italic;
}

.pf-forms-file-progress {
    margin-top: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.pf-forms-progress-bar {
    height: 4px;
    background: var(--wp--preset--color--primary, #007cba);
    width: 0%;
    transition: width 0.3s ease;
}

/* Submit Button */
.pf-forms-submit {
    border: none;
    padding: 15px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 120px;
}

.pf-forms-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pf-forms-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Messages */
.pf-forms-messages {
    margin-bottom: 20px;
}

.pf-forms-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

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

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

.pf-forms-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}


/* Field Validation */
.pf-forms-field.error input,
.pf-forms-field.error select,
.pf-forms-field.error textarea {
    border-color: #e74c3c;
}

.pf-forms-field-error {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pf-forms-container {
        margin: 0 10px;
        padding: 15px;
    }

    .pf-forms-title {
        font-size: 1.5em;
    }

    .pf-forms-subtitle {
        font-size: 1em;
    }

    .pf-forms-field input[type="text"],
    .pf-forms-field input[type="email"],
    .pf-forms-field select,
    .pf-forms-field textarea {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .pf-forms-file-input-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .pf-forms-submit {
        width: 100%;
        padding: 12px;
    }
}