/* Notification System */
/* 개선된 알림 시스템 */

/* 토스트 알림 스타일 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 16px;
    border-left: 4px solid #007bff;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.warning {
    border-left-color: #ffc107;
}

.toast.info {
    border-left-color: #17a2b8;
}

.toast-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.toast-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.toast.success .toast-icon {
    background-color: #28a745;
}

.toast.error .toast-icon {
    background-color: #dc3545;
}

.toast.warning .toast-icon {
    background-color: #ffc107;
}

.toast.info .toast-icon {
    background-color: #17a2b8;
}

.toast-title {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-body {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 애니메이션 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hide {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* 로딩 스피너 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* 버튼 로딩 상태 */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 모달 개선 */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
    border-radius: 12px 12px 0 0;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
    border-radius: 0 0 12px 12px;
}

/* 폼 검증 스타일 */
.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
}

/* 진행률 표시 */
.progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background-color: #007bff;
    transition: width 0.3s ease;
}

/* 툴팁 개선 */
.tooltip {
    font-size: 12px;
}

.tooltip-inner {
    background-color: #333;
    border-radius: 6px;
    padding: 8px 12px;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 8px;
        padding: 12px;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-content {
        border-radius: 8px;
    }
}
