/* ==============================================
   모듈 로더 시스템 CSS - 2025 Modern Design
   ============================================== */

/* 모듈 로딩 상태 */
.module-loading {
    position: relative;
    min-height: 200px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: var(--radius-lg);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(79, 70, 229, 0.1);
    border-left: 4px solid var(--primary-gradient);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 모듈 에러 상태 */
.module-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.module-error .error-icon {
    color: #dc2626;
    font-size: 48px;
    margin-bottom: 16px;
}

.module-error .error-title {
    color: #7f1d1d;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.module-error .error-message {
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 16px;
}

.retry-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* 모듈 전환 애니메이션 */
.module-transition-enter {
    opacity: 0;
    transform: translateY(20px);
    animation: moduleEnter 0.3s ease forwards;
}

.module-transition-exit {
    opacity: 1;
    transform: translateY(0);
    animation: moduleExit 0.2s ease forwards;
}

@keyframes moduleEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes moduleExit {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 모듈별 동적 스타일 */
.module-container {
    min-height: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 서비스별 색상 테마 */
.module-container[data-service*="real_estate"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.module-container[data-service*="car"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(217, 119, 6, 0.05) 100%);
    border-color: rgba(245, 158, 11, 0.2);
}

.module-container[data-service*="insurance"] {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(29, 78, 216, 0.05) 100%);
    border-color: rgba(59, 130, 246, 0.2);
}

/* 모듈 헤더 */
.module-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 20px;
    color: white;
}

.module-icon[data-category="realestate"] {
    background: var(--real-estate-gradient);
}

.module-icon[data-category="car"] {
    background: var(--car-gradient);
}

.module-icon[data-category="insurance"] {
    background: var(--insurance-gradient);
}

.module-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.module-description {
    font-size: 14px;
    color: var(--gray-600);
    margin: 4px 0 0 0;
}

/* 모듈 컨텐츠 */
.module-content {
    flex: 1;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .module-container {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .module-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .module-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
        font-size: 18px;
    }
    
    .module-title {
        font-size: 20px;
    }
    
    .module-description {
        font-size: 13px;
    }
}

/* 모듈 성공 상태 */
.module-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #6ee7b7;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 16px 0;
}

.module-success .success-icon {
    color: #059669;
    font-size: 20px;
    margin-right: 8px;
}

.module-success .success-message {
    color: #064e3b;
    font-weight: 500;
}

/* 모듈 정보 상태 */
.module-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 16px 0;
}

.module-info .info-icon {
    color: #2563eb;
    font-size: 20px;
    margin-right: 8px;
}

.module-info .info-message {
    color: #1e3a8a;
    font-weight: 500;
}

/* 모듈 경고 상태 */
.module-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 16px 0;
}

.module-warning .warning-icon {
    color: #d97706;
    font-size: 20px;
    margin-right: 8px;
}

.module-warning .warning-message {
    color: #92400e;
    font-weight: 500;
} 

