/* Step by Step Inquiry Styles */
.step-inquiry-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 3rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4C5680, #5A6B8A);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 11.11%; /* 1/9 steps */
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #4C5680;
}

/* Step Panels */
.step-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.step-panel.active {
    display: block;
}

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

.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 0.5rem;
}

.step-header p {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Form Styles */
.step-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 0.5rem;
    position: relative;
}

/* 필수 필드 표시 */
.form-group label.required::after {
    content: ' *';
    color: #e74c3c;
    font-weight: 700;
    font-size: 1.1em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4C5680;
    box-shadow: 0 0 0 3px rgba(76, 86, 128, 0.1);
}

/* 필수 필드 강조 */
.form-group.required input,
.form-group.required select,
.form-group.required textarea {
    border-left: 4px solid #4C5680;
    padding-left: 0.5rem;
}

.form-group.required input:focus,
.form-group.required select:focus,
.form-group.required textarea:focus {
    border-color: #4C5680;
    box-shadow: 0 0 0 3px rgba(76, 86, 128, 0.15);
}

/* 필수 필드 미입력 시 에러 스타일 */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.form-group.error label {
    color: #e74c3c;
}

.form-group .error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Radio Group Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.radio-option:hover {
    border-color: #4C5680;
    background: rgba(76, 86, 128, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(76, 86, 128, 0.15);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-radius: 50%;
    margin-right: 1.5rem;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: #fff;
}

.radio-option:hover .radio-custom {
    border-color: #4C5680;
    transform: scale(1.1);
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #4C5680;
    background: #4C5680;
    transform: scale(1.1);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.radio-option input[type="radio"]:checked ~ .radio-content {
    color: #4C5680;
}

.radio-option input[type="radio"]:checked {
    border-color: #4C5680;
    background: rgba(76, 86, 128, 0.08);
    box-shadow: 0 4px 16px rgba(76, 86, 128, 0.2);
}

/* 선택된 상태 추가 스타일 */
.radio-option.selected {
    border-color: #4C5680;
    background: rgba(76, 86, 128, 0.08);
    box-shadow: 0 4px 16px rgba(76, 86, 128, 0.2);
    transform: translateY(-1px);
}

.radio-option.selected .radio-custom {
    border-color: #4C5680;
    background: #4C5680;
    transform: scale(1.1);
}

.radio-option.selected .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.radio-option.selected .radio-content strong {
    color: #4C5680;
}

.radio-option.selected .radio-content p {
    color: #5A6B8A;
}

.radio-content strong {
    display: block;
    font-size: 1.2rem;
    color: #2C3E50;
    margin-bottom: 0.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.radio-content p {
    color: #6c757d;
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

/* 선택된 상태에서 텍스트 색상 변경 */
.radio-option input[type="radio"]:checked ~ .radio-content strong {
    color: #4C5680;
}

.radio-option input[type="radio"]:checked ~ .radio-content p {
    color: #5A6B8A;
}

/* 호버 상태에서 텍스트 색상 변경 */
.radio-option:hover .radio-content strong {
    color: #4C5680;
}

.radio-option:hover .radio-content p {
    color: #5A6B8A;
}

/* Checkbox Styles */
.checkbox-option {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
}

.checkbox-option:hover {
    border-color: #4C5680;
    background: rgba(76, 86, 128, 0.02);
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-right: 1rem;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: #fff;
}

.checkbox-option:hover .checkbox-custom {
    border-color: #4C5680;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
    border-color: #4C5680;
    background: #4C5680;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.checkbox-content strong {
    display: block;
    font-size: 1rem;
    color: #2C3E50;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.checkbox-content p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Consent Section Styles */
.consent-section-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 1rem;
    display: block;
}

.consent-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.consent-option {
    width: 100%;
}

/* Standard Checkbox Styles */
.standard-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    cursor: pointer;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
    gap: 0.75rem;
    flex-direction: row !important; /* 체크박스를 왼쪽에 고정 */
}

.standard-checkbox-label:hover {
    border-color: #4C5680;
    background: rgba(76, 86, 128, 0.02);
}

.standard-checkbox {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    cursor: pointer;
    accent-color: #4C5680;
    margin-top: 2px !important; /* 텍스트와 정렬 맞추기 */
    order: -1 !important; /* 체크박스를 맨 앞으로 강제 이동 */
}

.checkbox-text {
    flex: 1;
    min-width: 0; /* 텍스트가 줄바꿈되도록 */
}

.checkbox-text strong {
    display: block;
    font-size: 1rem;
    color: #2C3E50;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.checkbox-text p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Fade in animation for consent section */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Step Info Styles */
.step-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(76, 86, 128, 0.05);
    border-left: 4px solid #4C5680;
    border-radius: 0 8px 8px 0;
}

.step-info p {
    margin: 0;
    color: #5A6B8A;
    font-size: 0.9rem;
    line-height: 1.5;
}

.step-info strong {
    color: #4C5680;
    font-weight: 600;
}

/* Password Requirements Styles */
.password-requirements {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(76, 86, 128, 0.05);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.password-requirements p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #2C3E50;
    font-weight: 600;
}

.password-requirements ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.password-requirements li {
    margin: 0.25rem 0;
    font-size: 0.85rem;
    color: #6c757d;
    position: relative;
    transition: color 0.3s ease;
}

.password-requirements li::before {
    content: '○';
    position: absolute;
    left: -1.25rem;
    color: #dc3545;
    font-weight: bold;
}

.password-requirements li.valid {
    color: #28a745;
}

.password-requirements li.valid::before {
    content: '✓';
    color: #28a745;
}

.password-match {
    margin-top: 0.5rem;
}

.match-indicator {
    color: #28a745;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Format Validation Styles */
.format-validation {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.validation-message {
    color: #721c24;
    font-size: 0.85rem;
    font-weight: 500;
}

.form-group.valid input {
    border-color: #28a745;
    background-color: #f8fff9;
}

.form-group.invalid input {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Account Fields */
.account-fields {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Co-borrower Fields */
.co-borrower-fields {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.co-borrower-fields h3 {
    margin-bottom: 1rem;
    color: #2C3E50;
}

/* Review Content */
.review-content {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.review-section {
    margin-bottom: 1.5rem;
}

.review-section h4 {
    color: #4C5680;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.review-item:last-child {
    border-bottom: none;
}

.review-label {
    font-weight: 600;
    color: #2C3E50;
}

.review-value {
    color: #6c757d;
}

/* Navigation Buttons */
.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(45deg, #4C5680, #5A6B8A);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #3A4A6B, #4C5680);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 86, 128, 0.3);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(45deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4C5680;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1.1rem;
}

/* Success Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-header h3 {
    color: #28a745;
    margin-bottom: 1rem;
}

.modal-body p {
    color: #6c757d;
    margin-bottom: 1rem;
}

.success-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .step-inquiry-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .radio-option {
        padding: 1.25rem;
        flex-direction: row;
        text-align: left;
    }
    
    .radio-custom {
        margin-right: 1rem;
        margin-bottom: 0;
        width: 20px;
        height: 20px;
    }
    
    .radio-content strong {
        font-size: 1.1rem;
    }
    
    .radio-content p {
        font-size: 0.95rem;
    }
}

/* 추가 시각적 개선 */
.radio-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, transparent 0%, rgba(76, 86, 128, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.radio-option:hover::before {
    opacity: 1;
}

.radio-option input[type="radio"]:checked::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(76, 86, 128, 0.1) 0%, rgba(90, 107, 138, 0.05) 100%);
}

/* Review Content Styles */
.review-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.review-section h3 {
    color: #4C5680;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4C5680;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.review-item:hover {
    border-color: #4C5680;
    box-shadow: 0 2px 8px rgba(76, 86, 128, 0.1);
}

.review-label {
    font-weight: 600;
    color: #2C3E50;
    flex-shrink: 0;
    margin-right: 1rem;
}

.review-value {
    color: #4C5680;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* Responsive Review */
@media (max-width: 768px) {
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .review-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .review-value {
        text-align: left;
    }
}

/* Loan Officer Introduction Message */
.loan-officer-intro {
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    border: 2px solid #4C5680;
    border-radius: 12px;
    padding: 20px 25px;
    margin: 20px 0 30px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(76, 86, 128, 0.15);
    animation: slideInDown 0.6s ease-out;
}

.loan-officer-intro p {
    margin: 0;
    font-size: 1.1rem;
    color: #4C5680;
    font-weight: 500;
    line-height: 1.6;
}

.loan-officer-intro strong {
    color: #2C3E50;
    font-weight: 700;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add Co-borrower Button */
.add-co-borrower-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.add-co-borrower-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.add-co-borrower-btn .btn-icon {
    font-size: 1.2rem;
    font-weight: bold;
}
