
/* SimpleForm Pro Frontend Styles */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Roboto:wght@300;400;500;700&family=Lato:wght@300;400;700&family=Montserrat:wght@300;400;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

.sfp-form-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: inherit;
}

.sfp-form {
    background: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.sfp-field-container {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.sfp-field-container.sfp-field-hidden {
    display: none;
}

.sfp-field-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    transition: color 0.3s ease;
}

.sfp-field-label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.sfp-field-input,
.sfp-field-textarea,
.sfp-field-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.4;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.sfp-field-input:focus,
.sfp-field-textarea:focus,
.sfp-field-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
    transform: translateY(-1px);
}

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

.sfp-field-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;
}

.sfp-radio-group,
.sfp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sfp-checkbox-group.sfp-image-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.sfp-radio-label,
.sfp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.4;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 6px;
}

.sfp-checkbox-label.sfp-image-option {
    flex-direction: column;
    text-align: center;
    border: 2px solid #e0e0e0;
    padding: 15px;
    background: #fff;
    transition: all 0.3s ease;
}

.sfp-checkbox-label.sfp-image-option:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
}

.sfp-checkbox-label.sfp-image-option.checked {
    border-color: #3498db;
    background: #f8fbff;
}

.sfp-option-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.sfp-checkbox-label.sfp-image-option:hover .sfp-option-image {
    transform: scale(1.05);
}

.sfp-radio-label input,
.sfp-checkbox-label input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.sfp-checkbox-label.sfp-image-option input {
    position: absolute;
    opacity: 0;
}

.sfp-radio-label:hover,
.sfp-checkbox-label:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.sfp-field-description {
    margin: 5px 0 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.sfp-payment-field {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.sfp-payment-amount {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.sfp-submit-container {
    margin-top: 30px;
    text-align: center;
}

.sfp-submit-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    font-family: inherit;
}

.sfp-submit-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.sfp-submit-button:active {
    transform: translateY(0);
}

.sfp-submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sfp-loading {
    display: none;
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

.sfp-messages {
    margin-top: 20px;
}

.sfp-success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 6px;
    font-weight: 500;
    animation: slideInUp 0.5s ease;
}

.sfp-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 6px;
    animation: shake 0.5s ease;
}

.sfp-error-message ul {
    margin: 0;
    padding-left: 20px;
}

.sfp-error-message li {
    margin-bottom: 5px;
}

.sfp-recaptcha-container {
    margin: 20px 0;
    text-align: center;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.sfp-pulse {
    animation: pulse 2s infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .sfp-form {
        padding: 20px;
        margin: 10px;
    }
    
    .sfp-field-input,
    .sfp-field-textarea,
    .sfp-field-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .sfp-submit-button {
        width: 100%;
        padding: 15px;
    }
    
    .sfp-radio-group,
    .sfp-checkbox-group {
        gap: 12px;
    }
    
    .sfp-checkbox-group.sfp-image-checkboxes {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .sfp-option-image {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .sfp-form-container {
        margin: 0;
    }
    
    .sfp-form {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .sfp-payment-amount {
        font-size: 20px;
    }
    
    .sfp-checkbox-group.sfp-image-checkboxes {
        grid-template-columns: 1fr 1fr;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sfp-field-input,
    .sfp-field-textarea,
    .sfp-field-select {
        border-width: 3px;
    }
    
    .sfp-submit-button {
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sfp-field-input,
    .sfp-field-textarea,
    .sfp-field-select,
    .sfp-submit-button,
    .sfp-checkbox-label,
    .sfp-radio-label {
        transition: none;
    }
    
    .sfp-submit-button:hover,
    .sfp-checkbox-label:hover {
        transform: none;
    }
    
    .sfp-success-message,
    .sfp-error-message {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .sfp-form {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .sfp-field-input,
    .sfp-field-textarea,
    .sfp-field-select {
        background: #34495e;
        border-color: #4a5a6a;
        color: #ecf0f1;
    }
    
    .sfp-field-input:focus,
    .sfp-field-textarea:focus,
    .sfp-field-select:focus {
        border-color: #5dade2;
        box-shadow: 0 0 0 3px rgba(93, 173, 226, 0.2);
    }
    
    .sfp-field-label {
        color: #ecf0f1;
    }
    
    .sfp-field-description {
        color: #bdc3c7;
    }
    
    .sfp-payment-field {
        background: #34495e;
        border-color: #4a5a6a;
    }
    
    .sfp-payment-amount {
        color: #ecf0f1;
    }
    
    .sfp-checkbox-label.sfp-image-option {
        background: #34495e;
        border-color: #4a5a6a;
    }
    
    .sfp-checkbox-label.sfp-image-option.checked {
        background: #2c3e50;
        border-color: #5dade2;
    }
}

/* Focus indicators for accessibility */
.sfp-radio-label input:focus,
.sfp-checkbox-label input:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Loading animation */
.sfp-loading:after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 5px;
    border: 2px solid #666;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Validation states */
.sfp-field-input.error,
.sfp-field-textarea.error,
.sfp-field-select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
    animation: shake 0.5s ease;
}

.sfp-field-input.success,
.sfp-field-textarea.success,
.sfp-field-select.success {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Custom themed styles will be injected here */
