�/* --- Notification Container & Base Buttons --- */
.notification-container {
    position: relative; /* */
}

.icon-btn {
    background: none; /* */
    border: none; /* */
    padding: 0.5rem; /* */
    color: #9CA3AF; /* */
    cursor: pointer; /* */
    transition: color 0.2s; /* */
}

.icon-btn:hover {
    color: var(--primary); /* */
}

.icon-btn .material-icons-round {
    font-size: 1.5rem; /* */
}

#navinfo-placeholder .notification-container,
#navinfo-placeholder #notificationButton {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
}

#navinfo-placeholder #notificationButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    margin: 0;
}

#navinfo-placeholder #notificationButton :is(i, svg, span.material-icons-round, .material-symbols-outlined) {
    width: 19px;
    height: 19px;
    font-size: 19px;
    line-height: 1;
}

#navinfo-placeholder #notificationButton .badge-dot {
    top: 2px;
    right: 2px;
}

.relative {
    position: relative; /* */
}

/* --- Badge Dot & Animation --- */
.badge-dot {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    min-width: 1.1rem;
    height: 1.1rem;
    background: var(--danger);
    border-radius: 999px;
    border: 2px solid var(--bg-light);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1;
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; /* */
}

@keyframes pulse {
    0%, 100% { opacity: 1; } /* */
    50% { opacity: .5; } /* */
}

    /* �ѧ�Ѻ�����ǹ Header ��������˹�� Dashboard Content */
    #navinfo-placeholder {
        position: relative; /* ���繵�ͧ��������� z-index �ӧҹ */
        z-index: 1000;      /* ����٧����??? (����? 0 ���� 1) */
        background: transparent; /* �����յ����ͧ��� */
    }

    /* ��ͧ�ѹ������ Sidebar ������ǹ��蹺ѧ (�������) */
    .dashboard-container {
        position: relative;
        z-index: 1; /* ����ӡ��� Navinfo */
    }


/* --- Dropdown Menu Structure --- */
/* ʶҹ�������鹢ͧ Dropdown (��͹�����������������Ѻ Animation) */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 20rem;
    background: var(--card-light);
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    z-index: 9999 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 8rem);
    
    /* Animation Properties */
    transform-origin: top right; /* �������͡�Ҩҡ�����Һ� */
    transform: scale(0.95);      /* ������鹷�袹Ҵ��硡��һ�����硹��� */
    opacity: 0;                  /* ������鹷������� */
    visibility: hidden;          /* ��ͧ�ѹ��ä�ԡⴹ������Ы�͹ */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* �ѧ��� Smooth ����͹�鹩�Ѻ */
}

@media (min-width: 768px) {
    .dropdown-menu {
        position: fixed;
        top: 6rem;
        right: 2rem;
    }
}

/* ���ʷ��ж١������� JS �������� "�Դ" */
.dropdown-menu.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1); /* ���¡�Ѻ�Ң�Ҵ���� */
}

/* ���� .hidden �з�˹�ҷ��Ѵ����ʴ����͡仨ҡ DOM (��óջԴʹԷ) */
.hidden {
    display: none !important;
}

@media (min-width: 768px) {
    .dropdown-menu {
        position: fixed; /* */
        top: 6rem; /* */
        right: 2rem; /* */
    }
}

.hidden {
    display: none !important; /* */
}

/* --- Dropdown Header --- */
.dropdown-header {
    padding: 1rem 1.25rem; /* */
    border-bottom: 1px solid var(--border-color); /* */
    display: flex; /* */
    justify-content: space-between; /* */
    align-items: center; /* */
    background: rgba(255,255,255,0.8); /* */
    backdrop-filter: blur(4px); /* */
}

.dd-title {
    display: flex; /* */
    align-items: center; /* */
    gap: 0.5rem; /* */
}

.dd-title h3 {
    margin: 0; /* */
    font-size: 1.125rem; /* */
    font-weight: 700; /* */
}

.badge-new {
    background: var(--danger); /* */
    color: white; /* */
    font-size: 0.625rem; /* */
    padding: 0.125rem 0.375rem; /* */
    border-radius: 0.375rem; /* */
    font-weight: 700; /* */
}

.btn-text {
    background: none; /* */
    border: none; /* */
    color: var(--text-muted); /* */
    font-size: 0.75rem; /* */
    cursor: pointer; /* */
}

.btn-text:hover {
    color: var(--primary); /* */
}

/* --- Dropdown Body & Items --- */
.dropdown-body {
    overflow-y: auto; /* */
    background: rgba(249,250,251,0.5); /* */
    flex: 1; /* */
}

.section-label {
    padding: 0.75rem 1.25rem 0.25rem; /* */
    font-size: 0.75rem; /* */
    font-weight: 600; /* */
    color: var(--text-muted); /* */
    text-transform: uppercase; /* */
}

.noti-item {
    padding: 0.75rem; /* */
    margin: 0 0.75rem 0.75rem; /* */
    background: var(--card-light); /* */
    border-radius: 0.75rem; /* */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* */
    cursor: pointer; /* */
    transition: transform 0.2s; /* */
    position: relative; /* */
}

.noti-item:hover {
    transform: translateY(-1px); /* */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* */
}

.noti-item.urgent {
    border-left: 4px solid var(--primary); /* */
}

.noti-item.info {
    border-left: 4px solid var(--info); /* */
}

.noti-item.read {
    opacity: 0.75; /* */
}

.noti-dot {
    position: absolute; /* */
    right: 0.5rem; /* */
    top: 0.5rem; /* */
    width: 0.5rem; /* */
    height: 0.5rem; /* */
    background: var(--danger); /* */
    border-radius: 50%; /* */
}

.noti-content {
    display: flex; /* */
    gap: 0.75rem; /* */
}

/* --- Noti Icons --- */
.noti-icon-box {
    position: relative; /* */
}

.noti-icon-box img {
    width: 2.5rem; /* */
    height: 2.5rem; /* */
    border-radius: 50%; /* */
    object-fit: cover; /* */
    border: 2px solid white; /* */
}

.icon-badge {
    position: absolute; /* */
    bottom: -0.25rem; /* */
    right: -0.25rem; /* */
    background: white; /* */
    border-radius: 50%; /* */
    padding: 0.125rem; /* */
}

.icon-badge span {
    font-size: 0.75rem; /* */
    color: var(--primary); /* */
    background: #FFEDD5; /* */
    border-radius: 50%; /* */
    padding: 0.125rem; /* */
}

.noti-icon-circle {
    width: 2.5rem; /* */
    height: 2.5rem; /* */
    border-radius: 50%; /* */
    display: flex; /* */
    align-items: center; /* */
    justify-content: center; /* */
    flex-shrink: 0; /* */
}

.noti-icon-circle.blue { background: #EFF6FF; color: var(--info); } /* */
.noti-icon-circle.green { background: #ECFDF5; color: var(--success); } /* */
.noti-icon-circle.gray { background: #F3F4F6; color: var(--text-muted); } /* */

/* --- Noti Text & Meta --- */
.noti-text {
    flex: 1; /* */
    min-width: 0; /* */
}

.noti-title {
    font-size: 0.875rem; /* */
    font-weight: 700; /* */
    margin: 0; /* */
    line-height: 1.25; /* */
}

.noti-title span {
    font-weight: 400; /* */
    color: var(--text-muted); /* */
}

.noti-desc {
    font-size: 0.75rem; /* */
    color: var(--text-muted); /* */
    margin: 0.25rem 0 0; /* */
    overflow: hidden; /* */
    display: -webkit-box; /* */
    -webkit-line-clamp: 2; /* */
    -webkit-box-orient: vertical; /* */
}

.noti-meta {
    display: flex; /* */
    align-items: center; /* */
    gap: 0.5rem; /* */
    margin-top: 0.5rem; /* */
}

.status-badge.pending {
    font-size: 0.625rem; /* */
    padding: 0.125rem 0.375rem; /* */
    border-radius: 0.25rem; /* */
    font-weight: 500; /* */
    color: var(--primary); /* */
    background: #FFF7ED; /* */
}

.time {
    font-size: 0.625rem; /* */
    color: #9CA3AF; /* */
}

/* --- Dropdown Footer --- */
.dropdown-footer {
    padding: 0.75rem; /* */
    border-top: 1px solid var(--border-color); /* */
    background: var(--card-light); /* */
}

.btn-full {
    width: 100%; /* */
    padding: 0.625rem; /* */
    background: #F9FAFB; /* */
    border: none; /* */
    border-radius: 0.75rem; /* */
    color: var(--text-muted); /* */
    font-size: 0.875rem; /* */
    font-weight: 500; /* */
    cursor: pointer; /* */
    display: flex; /* */
    align-items: center; /* */
    justify-content: center; /* */
    gap: 0.5rem; /* */
    transition: all 0.2s; /* */
}

.btn-full:hover {
    background: var(--primary); /* */
    color: white; /* */
}


/* Navinfo notification visibility lock. */
#navinfo-placeholder #notification-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    flex: 0 0 40px !important;
}

#navinfo-placeholder .notification-container {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
}

#navinfo-placeholder #notificationButton {
    color: var(--synto-shell-muted, #737780) !important;
    border-radius: 50% !important;
    background: transparent !important;
}

#navinfo-placeholder #notificationButton:hover,
#navinfo-placeholder #notificationButton:focus-visible {
    color: var(--primary-orange, #fc5b08) !important;
    background: rgba(252, 91, 8, 0.08) !important;
}
