/* ========================================
   메시지 및 알림 스타일
   ======================================== */

/* ========================================
   기본 메시지 스타일
   ======================================== */
.message {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid transparent;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}

/* 닫기 버튼 */
.message .close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.message .close:hover {
    opacity: 1;
}

/* ========================================
   메시지 타입별 스타일
   ======================================== */

/* 에러 메시지 */
.error-message,
.message-error,
.alert-danger {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.5;
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.error-message a,
.message-error a,
.alert-danger a {
    color: #491217;
    text-decoration: underline;
}

/* 성공 메시지 */
.success-message,
.message-success,
.alert-success {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.5;
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.success-message a,
.message-success a,
.alert-success a {
    color: #0b2e13;
    text-decoration: underline;
}

/* 정보 메시지 */
.info-message,
.message-info,
.alert-info {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.5;
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.info-message a,
.message-info a,
.alert-info a {
    color: #062c33;
    text-decoration: underline;
}

/* 경고 메시지 */
.warning-message,
.message-warning,
.alert-warning {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.5;
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.warning-message a,
.message-warning a,
.alert-warning a {
    color: #533f03;
    text-decoration: underline;
}

/* ========================================
   중앙 정렬 메시지 (로그인 페이지 등)
   ======================================== */
.message-center {
    text-align: center;
}

/* ========================================
   아이콘이 있는 메시지
   ======================================== */
.message-with-icon {
    padding-left: 45px;
    position: relative;
}

.message-with-icon::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.error-message.message-with-icon::before {
    content: '✕';
    color: #721c24;
    font-size: 16px;
    font-weight: bold;
}

.success-message.message-with-icon::before {
    content: '✓';
    color: #155724;
    font-size: 16px;
    font-weight: bold;
}

.info-message.message-with-icon::before {
    content: 'ⓘ';
    color: #0c5460;
    font-size: 16px;
    font-weight: bold;
}

.warning-message.message-with-icon::before {
    content: '!';
    color: #856404;
    font-size: 16px;
    font-weight: bold;
}

/* ========================================
   인라인 메시지 (폼 필드 아래)
   ======================================== */
.field-message {
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.field-error {
    color: #dc3545;
}

.field-success {
    color: #28a745;
}

.field-warning {
    color: #ffc107;
}

.field-info {
    color: #17a2b8;
}

/* ========================================
   토스트 알림
   ======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 10px;
    padding: 15px 20px;
    min-width: 300px;
    max-width: 500px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    border-left: 4px solid #333;
}

.toast.toast-success {
    border-left-color: #28a745;
}

.toast.toast-error {
    border-left-color: #dc3545;
}

.toast.toast-warning {
    border-left-color: #ffc107;
}

.toast.toast-info {
    border-left-color: #17a2b8;
}

.toast-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.toast-message {
    font-size: 14px;
    color: #666;
}

/* 토스트 애니메이션 */
@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.toast-exit {
    animation: slideOutRight 0.3s ease-out;
}

/* ========================================
   로그인 페이지 전용 스타일
   ======================================== */
.remember-me {
    margin: 10px 0;
    text-align: left;
}

.remember-me input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

.remember-me label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.remember-me label:hover {
    color: #333;
}

/* ========================================
   반응형 디자인
   ======================================== */
@media (max-width: 768px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
    
    .message {
        font-size: 13px;
        padding: 10px 12px;
    }
}