/**
 * Ezy Loan Manager - Multi-Step Form CSS
 * Version: 3.1.0
 * Basic functional styling (will be beautified later)
 */

/* Container */
.ezy-multistep-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    overflow-x: hidden;
}

/* PSA Notice */
.ezy-psa-notice {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
}

.ezy-psa-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.ezy-psa-content h3 {
    margin: 0 0 10px 0;
    color: #92400e;
}

.ezy-psa-content p {
    margin: 0 0 10px 0;
    color: #78350f;
}

.ezy-psa-details {
    margin-top: 10px;
}

.ezy-psa-details summary {
    cursor: pointer;
    font-weight: bold;
    color: #92400e;
    padding: 5px 0;
}

.ezy-psa-details ul {
    margin: 10px 0 0 20px;
    color: #78350f;
}

.ezy-psa-details li {
    margin: 5px 0;
}

/* Progress Bar */
.ezy-progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
}

.ezy-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.ezy-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s;
}

.ezy-progress-step.active .ezy-step-number {
    background: #1e40af;
    color: white;
}

.ezy-progress-step.completed .ezy-step-number {
    background: #10b981;
    color: white;
}

.ezy-step-label {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.ezy-progress-step.active .ezy-step-label {
    color: #1e40af;
    font-weight: bold;
}

.ezy-progress-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 10px;
}

/* Form Steps */
.ezy-multistep-form {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 30px;
}

.ezy-form-step {
    display: none;
}

.ezy-form-step.active {
    display: block;
}

.ezy-form-step h2 {
    margin: 0 0 20px 0;
    color: #1e40af;
}

.ezy-form-step h3 {
    margin: 20px 0 15px 0;
    color: #1f2937;
}

.ezy-step-description {
    color: #6b7280;
    margin-bottom: 20px;
}

/* Form Fields */
.ezy-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.ezy-form-group {
    margin-bottom: 20px;
}

.ezy-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.required {
    color: #ef4444;
}

.ezy-form-group input[type="text"],
.ezy-form-group input[type="email"],
.ezy-form-group input[type="tel"],
.ezy-form-group input[type="number"],
.ezy-form-group select,
.ezy-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.ezy-form-group input:focus,
.ezy-form-group select:focus,
.ezy-form-group textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.ezy-form-group input[readonly] {
    background: #f3f4f6;
    cursor: not-allowed;
}

.ezy-form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}

.error {
    border-color: #ef4444 !important;
}

.ezy-error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
}

/* Photo Upload */
.ezy-photo-preview {
    margin-top: 15px;
    text-align: center;
}

.ezy-photo-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #d1d5db;
}

.ezy-remove-photo {
    display: block;
    margin: 10px auto 0;
    padding: 5px 15px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.ezy-remove-photo:hover {
    background: #dc2626;
}

/* Loan Summary */
.ezy-loan-summary {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.ezy-loan-summary h3 {
    margin: 0 0 15px 0;
    color: #0369a1;
}

.ezy-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #bae6fd;
}

.ezy-summary-row:last-child {
    border-bottom: none;
}

.ezy-summary-highlight {
    background: #0369a1;
    color: white;
    padding: 15px 20px !important;
    margin: 10px -20px 0;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
}

/* Navigation Buttons */
.ezy-form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.ezy-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ezy-btn-primary {
    background: #1e40af;
    color: white;
}

.ezy-btn-primary:hover {
    background: #1e3a8a;
}

.ezy-btn-secondary {
    background: #6b7280;
    color: white;
}

.ezy-btn-secondary:hover {
    background: #4b5563;
}

.ezy-btn-success {
    background: #10b981;
    color: white;
}

.ezy-btn-success:hover {
    background: #059669;
}

/* Loading Overlay */
.ezy-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ezy-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.ezy-loading-overlay p {
    color: white;
    margin-top: 20px;
    font-size: 16px;
}

/* Success Message */
.ezy-success-message {
    text-align: center;
    padding: 40px 20px;
}

.ezy-success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.ezy-success-message h2 {
    color: #10b981;
    margin-bottom: 15px;
}

.ezy-success-message p {
    color: #6b7280;
    margin-bottom: 10px;
}

.ezy-redirect-message {
    font-weight: bold;
    color: #1e40af;
    margin: 20px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ezy-multistep-container {
        padding: 15px;
        margin: 20px auto;
    }
    
    .ezy-multistep-form {
        padding: 20px;
    }
    
    .ezy-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .ezy-progress-bar {
        padding: 0 5px;
        gap: 5px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .ezy-progress-bar::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .ezy-progress-step {
        min-width: 60px;
        flex-shrink: 0;
    }
    
    .ezy-step-label {
        font-size: 9px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60px;
    }
    
    .ezy-step-number {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .ezy-progress-line {
        margin: 0 3px;
        min-width: 10px;
    }
    
    .ezy-form-navigation {
        flex-direction: column;
    }
    
    .ezy-btn {
        width: 100%;
    }
    
    .ezy-psa-notice {
        flex-direction: column;
    }
}

/* Contract Box */
.ezy-contract-box {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 30px;
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 25px;
    font-size: 14px;
    line-height: 1.8;
}

.ezy-contract-box h3 {
    color: #1e40af;
    font-size: 20px;
    margin-bottom: 20px;
}

.ezy-contract-box h4 {
    color: #1e3a8a;
    font-size: 16px;
    margin-top: 25px;
    margin-bottom: 12px;
}

.ezy-contract-box ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.ezy-contract-box li {
    margin-bottom: 8px;
}

.ezy-agreement-checkbox {
    background: #f0f9ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.ezy-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.6;
}

.ezy-checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.ezy-agreement-note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 13px;
    color: #92400e;
}

.ezy-agreement-note strong {
    color: #78350f;
}

/* Due Date Highlight */
.ezy-summary-due {
    background: #fef3c7;
    padding: 15px 20px !important;
    margin: 10px -20px 0;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    font-size: 16px;
    font-weight: bold;
}

.ezy-summary-due strong {
    color: #92400e;
}

/* Document Preview Styles */
.ezy-doc-preview {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #f8fafc;
}

.ezy-doc-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
}

.ezy-file-list {
    margin-top: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 4px;
}

.ezy-file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.ezy-file-item span {
    flex: 1;
    font-size: 14px;
}

.ezy-file-item small {
    color: #64748b;
    margin-left: 10px;
}

/* Contract Header */
.ezy-contract-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #1e40af;
}

.ezy-contract-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

/* Contract Content */
.ezy-contract-content {
    line-height: 1.8;
}

.ezy-contract-content p {
    margin-bottom: 15px;
}

.ezy-contract-content ol {
    margin-left: 20px;
    margin-top: 10px;
}

.ezy-contract-content ol li {
    margin-bottom: 8px;
}

/* Signature Section */
.ezy-signature-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.ezy-signature-display {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border: 2px solid #1e40af;
    border-radius: 8px;
}

.ezy-signature-cursive {
    font-family: 'Dancing Script', 'Brush Script MT', cursive;
    font-size: 36px;
    color: #1e40af;
    text-align: center;
    padding: 20px;
    min-height: 60px;
    font-weight: bold;
}

.ezy-contract-footer-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.ezy-contract-footer-info p {
    margin-bottom: 10px;
    font-size: 14px;
}

.ezy-contract-footer-info span {
    font-weight: bold;
    color: #1e40af;
}

/* Import cursive font */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap');
