/* ALS Forms Frontend Styles */

body > #als-success-modal,
body #als-success-modal,
html #als-success-modal,
#als-success-modal {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    align-items: center !important;
    justify-content: center !important;
    animation: fadeIn 0.3s ease-out !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    transform: none !important;
    inset: 0 !important;
    max-width: none !important;
    max-height: none !important;
    float: none !important;
    clear: both !important;
}

body > #als-success-modal.show,
body > #als-success-modal[style*="flex"],
body #als-success-modal.show,
html #als-success-modal.show,
body #als-success-modal[style*="flex"],
html #als-success-modal[style*="flex"],
#als-success-modal.show,
#als-success-modal[style*="flex"] {
    display: flex !important;
}

body > .als-success-modal-inner,
body .als-success-modal-inner,
html .als-success-modal-inner,
.als-success-modal-inner {
    background: white !important;
    padding: 40px !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    text-align: center !important;
    position: relative !important;
    max-width: 400px !important;
    width: 90% !important;
    margin: 0 auto !important;
    animation: slideUp 0.3s ease-out !important;
    box-sizing: border-box !important;
    transform: translateX(0) translateY(0) !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    float: none !important;
    clear: both !important;
    min-height: auto !important;
    flex-shrink: 0 !important;
}

#als-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

#als-modal-close:hover {
    color: #666;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Container */
.als-form-container {
    margin: 20px auto;
    max-width: 600px;
}

.als-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form Fields */
.als-form-field {
    margin-bottom: 20px;
}

.als-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

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

.als-form-field input:focus,
.als-form-field textarea:focus,
.als-form-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

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

/* File Upload Styling */
.als-upload-label {
    display: inline-block;
    padding: 16px 28px;
    background: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.als-upload-label:hover {
    background: #e9ecef;
    border-color: #007cba;
}

.als-upload-icon {
    margin-right: 8px;
    font-size: 18px;
}

.als-upload-text {
    color: #666;
    font-weight: 500;
}

.als-upload-filename {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Radio and Checkbox Groups */
.als-form-field input[type="radio"],
.als-form-field input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Required Star */
.als-required-star {
    color: #e53935 !important;
}

/* Submit Button */
.als-form-field-submit {
    text-align: center;
    margin-top: 30px;
}

.als-form-field-submit button {
    background: #007cba;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 180px;
}

.als-form-field-submit button:hover {
    background: #005a87;
}

/* Error Messages */
.als-form-error {
    color: #e53935;
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
}

/* Row Layout */
.als-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.als-form-col {
    flex: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .als-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .als-form {
        padding: 20px;
        margin: 10px;
    }
    
    .als-success-modal-inner {
        padding: 30px 20px;
        margin: 20px;
    }
}