/* Form Builder Pro - Frontend Styles */

/* Form Wrapper */
.fbp-form-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; */
}

.fbp-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #534242;
}

/* Form Description */
.fbp-form-description {
    /* box-shadow: 7px 7px 8px 0px rgba(0, 0, 0, 0.5);
    background-color: #ffffff; */
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    /* border: 1px solid #999999; */
    border-radius: 8px;
    width: max-content;
    justify-self: center;
    padding: 0px 6px 0px 6px;
}

/* Form Fields */
.fbp-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fbp-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Labels */
.fbp-field-label {
    font-weight: 800;
    font-size: 16px;
    color: #333;
    display: block;
}

.fbp-required {
    color: #dc3545;
    margin-left: 3px;
}

/* Input Fields */
.fbp-field-input,
.fbp-field-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
}

.fbp-field-textarea{
    width: 100%;
    /* padding: 12px 15px;
    border: 1px solid #ddd; */
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    /* background: #fff; */
}

.fbp-field-input:focus,
.fbp-field-textarea:focus,
.fbp-field-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.fbp-field-input::placeholder,
.fbp-field-textarea::placeholder {
    color: #999;
    opacity: 1;
}

/* Textarea */
.fbp-field-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Select */
.fbp-field-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* Radio & Checkbox Groups */
.fbp-radio-group,
.fbp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fbp-radio-label,
.fbp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.fbp-radio-label input[type="radio"],
.fbp-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0073aa;
}

/* File Upload */
.fbp-field-file {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.fbp-field-file:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

/* Field Description */
.fbp-field-description {
    font-size: 13px;
    color: #666;
    margin: 0;
    font-style: italic;
}

/* Honeypot (hidden field) */
.fbp-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

/* reCAPTCHA */
.fbp-recaptcha-wrapper {
    margin: 20px 0;
}

/* Submit Button */
.fbp-form-actions {
    margin-top: 25px;
    width: max-content;
    justify-self: center;
}

.fbp-submit-btn {
    padding: 14px 30px;
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.fbp-submit-btn:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.fbp-submit-btn:active {
    transform: translateY(0);
}

.fbp-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.fbp-submit-btn.fbp-loading {
    position: relative;
    color: transparent;
}

.fbp-submit-btn.fbp-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: fbp-spin 0.8s linear infinite;
}

@keyframes fbp-spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.fbp-form-messages {
    margin-top: 20px;
}

.fbp-success-message,
.fbp-error-message {
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
}

.fbp-success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fbp-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Field Validation Errors */
.fbp-field-error {
    border-color: #dc3545 !important;
}

.fbp-field-error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fbp-form {
        padding: 20px;
    }
    
    .fbp-field-input,
    .fbp-field-textarea,
    .fbp-field-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .fbp-submit-btn {
        padding: 12px 24px;
    }
}

/* Accessibility */
.fbp-field-input:focus-visible,
.fbp-field-textarea:focus-visible,
.fbp-field-select:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Empty State */
.fbp-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
}