/* WP Form Builder Pro - Public Styles - Modern & Clean */

.wpfb-form-wrapper {
    width: 100%;
    max-width: 100%;
}

.wpfb-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e1e1e;
}

.wpfb-form-title {
    margin: 0 0 12px;
    font-size: 1.5rem;
    font-weight: 600;
}

.wpfb-form-description {
    margin-bottom: 20px;
    color: #555;
    font-size: 0.95rem;
}

/* Fields */
.wpfb-field {
    margin-bottom: 18px;
    position: relative;
}

.wpfb-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.wpfb-label .req {
    color: #e11d48;
    margin-left: 2px;
}

.wpfb-field input[type="text"],
.wpfb-field input[type="email"],
.wpfb-field input[type="password"],
.wpfb-field input[type="number"],
.wpfb-field input[type="tel"],
.wpfb-field input[type="url"],
.wpfb-field input[type="date"],
.wpfb-field input[type="time"],
.wpfb-field input[type="datetime-local"],
.wpfb-field input[type="color"],
.wpfb-field input[type="file"],
.wpfb-field textarea,
.wpfb-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    color: #1e1e1e;
}

.wpfb-field input:focus,
.wpfb-field textarea:focus,
.wpfb-field select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.wpfb-field textarea {
    resize: vertical;
    min-height: 100px;
}

.wpfb-field-desc {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Choices */
.wpfb-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpfb-choices.wpfb-layout-horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.wpfb-choice-label,
.wpfb-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.wpfb-choice-label input,
.wpfb-checkbox-label input {
    width: auto;
    margin: 0;
    accent-color: #6366f1;
}

/* Name & Address */
.wpfb-name-fields,
.wpfb-address-fields .wpfb-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wpfb-address-fields .wpfb-full {
    grid-column: 1 / -1;
}

.wpfb-address-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Rating */
.wpfb-rating {
    display: flex;
    gap: 4px;
    font-size: 1.6rem;
    color: #d1d5db;
    cursor: pointer;
}

.wpfb-rating .wpfb-star {
    transition: color 0.15s ease, transform 0.15s ease;
}

.wpfb-rating .wpfb-star:hover,
.wpfb-rating .wpfb-star.active {
    color: #f59e0b;
    transform: scale(1.1);
}

/* Range */
.wpfb-field input[type="range"] {
    padding: 0;
    border: none;
    accent-color: #6366f1;
}

.wpfb-range-value {
    display: inline-block;
    margin-left: 10px;
    font-weight: 600;
    color: #6366f1;
}

/* Divider & Spacer */
.wpfb-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 10px 0;
}

.wpfb-spacer {
    width: 100%;
}

.wpfb-heading {
    margin: 0 0 8px;
    font-weight: 600;
}

.wpfb-paragraph {
    margin-bottom: 12px;
    color: #4b5563;
    line-height: 1.6;
}

/* Submit Button */
.wpfb-submit-wrap {
    margin-top: 8px;
}

.wpfb-btn,
.wpfb-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #6366f1;
    color: #fff;
    text-decoration: none;
    line-height: 1.4;
}

.wpfb-btn:hover,
.wpfb-submit:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.wpfb-btn:disabled,
.wpfb-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.wpfb-messages {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.wpfb-messages.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.wpfb-messages.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Multi-step */
.wpfb-steps .wpfb-step {
    display: none;
}

.wpfb-steps .wpfb-step.active {
    display: block;
}

.wpfb-step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
}

.wpfb-prev {
    background: #e5e7eb;
    color: #374151;
}

.wpfb-prev:hover {
    background: #d1d5db;
    box-shadow: none;
}

/* Field errors */
.wpfb-field.has-error input,
.wpfb-field.has-error textarea,
.wpfb-field.has-error select {
    border-color: #e11d48;
}

.wpfb-field-error {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #e11d48;
}

/* Responsive */
@media (max-width: 600px) {
    .wpfb-name-fields,
    .wpfb-address-fields .wpfb-row {
        grid-template-columns: 1fr;
    }

    .wpfb-choices.wpfb-layout-horizontal {
        flex-direction: column;
    }
}

/* Loading state */
.wpfb-form.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.wpfb-form.is-loading .wpfb-submit::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wpfb-spin 0.6s linear infinite;
    margin-left: 8px;
}

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