/* LFM Forms Styles - Enhanced Version */

/* Form Container */
.lfm-form-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Form Header */
.lfm-form .form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #0073aa;
}

.lfm-form .form-header h2 {
    color: #0073aa;
    font-size: 28px;
    margin: 0 0 10px;
    font-weight: 600;
}

.lfm-form .form-instructions {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.lfm-form .form-note {
    background: #f0f8ff;
    padding: 15px;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    margin: 15px 0;
    font-style: italic;
}

/* Form Sections */
.lfm-form fieldset {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    background: #fafafa;
}

.lfm-form legend {
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    width: auto;
}

.lfm-form legend small {
    font-size: 12px;
    font-weight: normal;
    opacity: 0.9;
}

/* Form Groups */
.lfm-form .form-group {
    margin-bottom: 20px;
}

.lfm-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.lfm-form .form-group.half {
    flex: 1 1 calc(50% - 20px);
    min-width: 250px;
}

.lfm-form .form-group.third {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 200px;
}

/* Labels */
.lfm-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.lfm-form .required {
    color: #d63638;
    font-size: 16px;
    margin-left: 3px;
}

/* Input Fields */
.lfm-form input[type="text"],
.lfm-form input[type="email"],
.lfm-form input[type="tel"],
.lfm-form input[type="number"],
.lfm-form input[type="date"],
.lfm-form select,
.lfm-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.lfm-form input:focus,
.lfm-form select:focus,
.lfm-form textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.lfm-form input:hover,
.lfm-form select:hover,
.lfm-form textarea:hover {
    border-color: #999;
}

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

/* Checkbox and Radio Groups */
.lfm-form .checkbox-group {
    margin: 15px 0;
}

.lfm-form .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
}

.lfm-form .checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.lfm-form .radio-group {
    display: flex;
    gap: 25px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.lfm-form .radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.lfm-form .radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* Terms Box */
.lfm-form .terms-box {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
}

.lfm-form .terms-box h4 {
    color: #0073aa;
    margin: 15px 0 10px;
    font-size: 16px;
}

.lfm-form .terms-box h4:first-child {
    margin-top: 0;
}

.lfm-form .terms-box ul,
.lfm-form .terms-box ol {
    margin: 10px 0;
    padding-left: 20px;
}

.lfm-form .terms-box li {
    margin: 5px 0;
    color: #555;
}

/* Investigation Groups */
.lfm-form .investigation-group {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.lfm-form .investigation-group h4 {
    color: #0073aa;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
}

/* File Input */
.lfm-form input[type="file"] {
    width: 100%;
    padding: 10px;
    background: white;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.lfm-form input[type="file"]:hover {
    border-color: #0073aa;
}

.lfm-form .lfm-file-input {
    margin-bottom: 5px;
}

.lfm-form small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

/* Error Message */
.lfm-form .error-message {
    color: #d63638;
    font-size: 13px;
    margin-top: 5px;
    padding: 5px 10px;
    background: #ffe6e6;
    border-radius: 4px;
}

/* Submit Button */
.lfm-form .form-actions {
    text-align: center;
    margin-top: 30px;
}

.lfm-form .submit-button {
    background: #0073aa;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,115,170,0.2);
    position: relative;
    min-width: 250px;
}

.lfm-form .submit-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,115,170,0.3);
}

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

.lfm-form .submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.lfm-form .loading-spinner {
    display: inline-block;
    margin-left: 10px;
}

/* Form Messages */
.lfm-form .form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    display: none;
    font-size: 15px;
    text-align: center;
}

.lfm-form .form-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.lfm-form .form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Admin Submission View */
.submission-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 10px 0;
}

.submission-details pre {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    overflow: auto;
    max-height: 400px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lfm-form-container {
        padding: 20px;
        margin: 15px;
    }
    
    .lfm-form .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .lfm-form .form-group.half,
    .lfm-form .form-group.third {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .lfm-form legend {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .lfm-form .form-header h2 {
        font-size: 22px;
    }
    
    .lfm-form .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .lfm-form .submit-button {
        width: 100%;
        min-width: auto;
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* Print Styles */
@media print {
    .lfm-form-container {
        max-width: 100%;
        margin: 0;
        padding: 20px;
        box-shadow: none;
    }
    
    .lfm-form .form-actions,
    .lfm-form .submit-button,
    .lfm-form .form-message,
    .lfm-form input[type="file"],
    .lfm-form .checkbox-group,
    .lfm-form .radio-group {
        display: none !important;
    }
    
    .lfm-form fieldset {
        page-break-inside: avoid;
        border: 1px solid #000;
        background: none;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .lfm-form legend {
        background: none;
        color: #000;
        border: 1px solid #000;
        padding: 5px 15px;
    }
    
    .lfm-form input,
    .lfm-form select,
    .lfm-form textarea {
        border: none;
        padding: 0;
        background: none;
        box-shadow: none;
    }
    
    .lfm-form input[type="text"],
    .lfm-form input[type="email"],
    .lfm-form input[type="tel"],
    .lfm-form textarea {
        border-bottom: 1px solid #000;
    }
}