/**
 * Simple Form Builder Pro - Frontend Styles
 */

/* Form Container */
.sfbp-form-container {
    margin: 20px 0;
}

.sfbp-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
}

/* Form Title and Description */
.sfbp-form-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.sfbp-form-description {
    margin: 0 0 25px 0;
    font-size: 16px;
    color: #666;
    text-align: center;
    line-height: 1.6;
}

/* Form Fields */
.sfbp-form-fields {
    margin-bottom: 25px;
}

.sfbp-field {
    margin-bottom: 20px;
}

.sfbp-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.sfbp-required {
    color: #dc3232;
    font-weight: bold;
    margin-left: 3px;
}

/* Input Fields */
.sfbp-input,
.sfbp-textarea,
.sfbp-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 16px;
    color: #333;
    background: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.sfbp-input:focus,
.sfbp-textarea:focus,
.sfbp-select:focus {
    outline: none;
    border-color: #3c3c3c;
    box-shadow: 0 0 0 3px rgba(60, 60, 60, 0.1);
}

.sfbp-textarea {
    resize: vertical;
    min-height: 100px;
}

.sfbp-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Radio and Checkbox Groups */
.sfbp-radio-group,
.sfbp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sfbp-radio-group.horizontal,
.sfbp-checkbox-group.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

.sfbp-radio-item,
.sfbp-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sfbp-radio-item input[type="radio"],
.sfbp-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #3c3c3c;
}

.sfbp-radio-item label,
.sfbp-checkbox-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

/* File Upload */
.sfbp-file-upload {
    position: relative;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sfbp-file-upload:hover {
    border-color: #3c3c3c;
    background: #f5f5f5;
}

.sfbp-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.sfbp-file-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #666;
}

.sfbp-file-info i {
    font-size: 32px;
    color: #3c3c3c;
}

.sfbp-file-info span {
    font-size: 16px;
    font-weight: 500;
}

.sfbp-file-types,
.sfbp-file-size {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #666;
}

/* Headings and Content */
.sfbp-heading {
    margin: 25px 0 15px 0;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.sfbp-heading.h1 { font-size: 28px; }
.sfbp-heading.h2 { font-size: 24px; }
.sfbp-heading.h3 { font-size: 20px; }
.sfbp-heading.h4 { font-size: 18px; }
.sfbp-heading.h5 { font-size: 16px; }
.sfbp-heading.h6 { font-size: 14px; }

.sfbp-paragraph {
    margin: 15px 0;
    color: #333;
    line-height: 1.6;
}

.sfbp-divider {
    margin: 25px 0;
    border: none;
    height: 1px;
    background: #e0e0e0;
}

/* Form Actions */
.sfbp-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.sfbp-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sfbp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sfbp-submit-button {
    background: #3c3c3c;
    color: #fff;
}

.sfbp-submit-button:hover {
    background: #2a2a2a;
}

.sfbp-reset-button {
    background: #6c757d;
    color: #fff;
}

.sfbp-reset-button:hover {
    background: #545b62;
}

.sfbp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sfbp-button .sfbp-loading {
    display: none;
}

.sfbp-button.loading .button-text {
    display: none;
}

.sfbp-button.loading .sfbp-loading {
    display: inline-block;
}

/* Field Help and Validation */
.sfbp-field-help {
    margin-top: 8px;
    font-size: 13px;
    color: #3c3c3c;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sfbp-field-error {
    margin-top: 8px;
    font-size: 13px;
    color: #dc3232;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sfbp-field-error.show {
    display: flex;
}

/* Form Messages */
.sfbp-form-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sfbp-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sfbp-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* CAPTCHA */
.sfbp-captcha-container {
    margin: 20px 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sfbp-form-title {
        font-size: 20px;
    }
    
    .sfbp-form-description {
        font-size: 14px;
    }
    
    .sfbp-input,
    .sfbp-textarea,
    .sfbp-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .sfbp-form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .sfbp-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .sfbp-radio-group.horizontal,
    .sfbp-checkbox-group.horizontal {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .sfbp-form {
        padding: 15px;
    }
    
    .sfbp-file-upload {
        padding: 20px;
    }
    
    .sfbp-file-info i {
        font-size: 24px;
    }
    
    .sfbp-file-info span {
        font-size: 14px;
    }
}

/* Accessibility */
.sfbp-input:focus,
.sfbp-textarea:focus,
.sfbp-select:focus,
.sfbp-button:focus {
    outline: 2px solid #3c3c3c;
    outline-offset: 2px;
}

.sfbp-radio-item input[type="radio"]:focus,
.sfbp-checkbox-item input[type="checkbox"]:focus {
    outline: 2px solid #3c3c3c;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .sfbp-input,
    .sfbp-textarea,
    .sfbp-select {
        border-width: 2px;
    }
    
    .sfbp-button {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .sfbp-input,
    .sfbp-textarea,
    .sfbp-select,
    .sfbp-button,
    .sfbp-file-upload {
        transition: none;
    }
    
    .sfbp-button:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .sfbp-form-actions,
    .sfbp-captcha-container {
        display: none;
    }
    
    .sfbp-form {
        border: 1px solid #000;
        padding: 20px;
    }
    
    .sfbp-input,
    .sfbp-textarea,
    .sfbp-select {
        border: 1px solid #000;
        background: #fff;
    }
} 
