/* ============================================================
 * 토스트 알림 시스템 CSS
 * 2025-12-31 작성
 * ============================================================ */

/* 토스트 컨테이너 */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    pointer-events: none;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .toast-container {
        top: 70px;
        right: 10px;
        left: 10px;
    }
}

/* 토스트 아이템 */
.toast-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 500px;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .toast-item {
        min-width: auto;
        max-width: 100%;
    }
}

/* 슬라이드 인 애니메이션 */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 슬라이드 아웃 애니메이션 */
@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-item.hiding {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* 토스트 아이콘 */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

/* 에러 타입 */
.toast-item.error {
    border-left: 4px solid #f44336;
}

.toast-item.error .toast-icon {
    background: #ffebee;
    color: #f44336;
}

/* 성공 타입 */
.toast-item.success {
    border-left: 4px solid #4caf50;
}

.toast-item.success .toast-icon {
    background: #e8f5e9;
    color: #4caf50;
}

/* 경고 타입 */
.toast-item.warning {
    border-left: 4px solid #ff9800;
}

.toast-item.warning .toast-icon {
    background: #fff3e0;
    color: #ff9800;
}

/* 정보 타입 */
.toast-item.info {
    border-left: 4px solid #2196f3;
}

.toast-item.info .toast-icon {
    background: #e3f2fd;
    color: #2196f3;
}

/* 토스트 내용 */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.toast-message {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    white-space: pre-line;
}

/* 닫기 버튼 */
.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #333;
}

/* 프로그레스 바 */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    transform-origin: left;
}

.toast-item.error .toast-progress {
    background: #f44336;
}

.toast-item.success .toast-progress {
    background: #4caf50;
}

.toast-item.warning .toast-progress {
    background: #ff9800;
}

.toast-item.info .toast-progress {
    background: #2196f3;
}
