/* --- RATING STARS --- */
.td-rating-box .td-stars {
    font-size: 1.25rem;
    cursor: pointer;
    display: inline-block;
}
.td-rating-box .td-stars i {
    transition: color 0.2s;
    padding: 0 2px;
}
.td-rating-box .td-stars:hover i {
    color: #e2e8f0; /* Reset về xám khi hover container */
}
.td-rating-box .td-stars i:hover,
.td-rating-box .td-stars i:hover ~ i {
    color: #e2e8f0; /* CSS trick để hover ngược, nhưng JS sẽ xử lý chính xác hơn */
}
/* Class active khi hover bằng JS */
.td-rating-box .td-stars i.hovered {
    color: #fbbf24 !important; /* Amber */
}

/* --- NOTIFICATION BELL --- */
.td-noti-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}
.td-noti-btn {
    position: relative;
}
.td-noti-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    display: none; /* Ẩn mặc định nếu = 0 */
}

/* --- REPORT MODAL --- */
.td-modal-report textarea {
    resize: none;
    min-height: 120px;
}

/* --- TOAST POPUP --- */
.td-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}
.td-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 420px;
    padding: 14px 20px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
    font-family: 'Quicksand', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    color: #334155;
    animation: tdToastIn .4s cubic-bezier(.22,1,.36,1) forwards;
    border-left: 4px solid var(--td-primary);
}
.td-toast.td-toast-out {
    animation: tdToastOut .3s ease-in forwards;
}
.td-toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: #fff;
}
.td-toast.td-toast-success .td-toast-icon {
    background: linear-gradient(135deg, #34d399, #059669);
}
.td-toast.td-toast-success { border-left-color: #059669; }
.td-toast.td-toast-error .td-toast-icon {
    background: linear-gradient(135deg, #f87171, #dc2626);
}
.td-toast.td-toast-error { border-left-color: #dc2626; }
.td-toast.td-toast-info .td-toast-icon {
    background: linear-gradient(135deg, #f472b6, var(--td-primary));
}
.td-toast.td-toast-info { border-left-color: var(--td-primary); }
.td-toast-msg {
    flex: 1;
    line-height: 1.4;
}
.td-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.1rem;
    padding: 0 0 0 8px;
    line-height: 1;
    transition: color .2s;
}
.td-toast-close:hover { color: #334155; }

/* Dark Mode */
.dark-mode .td-toast {
    background: #2c2c2c;
    color: #e2e8f0;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.dark-mode .td-toast-close { color: #64748b; }
.dark-mode .td-toast-close:hover { color: #e2e8f0; }

/* Animations */
@keyframes tdToastIn {
    from { opacity: 0; transform: translateY(-20px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tdToastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-20px) scale(.9); }
}

/* Mobile */
@media (max-width: 576px) {
    .td-toast-container { left: 10px; right: 10px; transform: none; }
    .td-toast { min-width: auto; max-width: 100%; font-size: .85rem; padding: 12px 16px; }
}
