/* Container and Dropdown Styling */
.notice-wrapper {
    position: relative;
}

.notice-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    width: 295px; /* Fixed Width */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    font-family: 'Inter', sans-serif; /* Clean font */
}

.notice-dropdown.active {
    display: block;
}

/* Header Section */
.notice-header {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.notice-header .close-btn, 
.notice-header .clear-btn {
    font-size: 10px; 
    color: #2d8a4e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.clear-btn { text-decoration: underline; }
.x-btn {
    color: #b5b5b5 !important;
    font-size: 15px !important;
}

/* Notification List Items (295x80) */
.notice-list {
    max-height: 400px;
    overflow-y: auto;
}

.notice-item {
    width: 295px;
    height: 80px; /* Fixed Height */
    padding: 6px 12px;
    border-bottom: 1px solid #f0f0f0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.notice-item:hover{
    background-color: #f0f0f0;
}

/* Title and Type Icons */
.notice-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #2d8a4e;
}

.header-left img {
    width: 14px;
    height: 14px;
}

/* Shrunken Content Text */
.notice-item p {
    font-size: 9.5px; /* Shrunken per photo */
    line-height: 1.2;
    color: #444;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-time {
    font-size: 8px !important;
    color: #b5b5b5 !important;
}
.notice-type {
    color: #2d8a4e;
}
/* Options Trigger and Menu (111x36) */
.options-trigger {
    background: none;
    border: none;
    color: #2d8a4e;
    font-size: 16px;
    cursor: pointer;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.notice-item p {
    line-height: 14px !important;
    font-size: 10px !important;
}

/* Instant circle when active */
.options-trigger.active {
    background-color: rgba(45, 138, 78, 0.15);
}

.options-menu {
    display: none;
    position: absolute;
    top: 5px;
    right: 42px;
    width: 111px; /* Precision size */
    height: 36px;  /* Precision size */
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
    flex-direction: column;
}

.options-menu.show {
    display: flex;
}

.menu-item {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 9px;
    color: #2d8a4e;
    cursor: pointer;
    white-space: nowrap;
}

.menu-item:hover {
    background-color: #f9f9f9;
}

.menu-item img {
    width: 11px;
    margin-right: 5px;
}

/* Animation State */
.notice-item.removing {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    border: none;
    transition: 
        opacity 0.3s ease, 
        max-height 0.4s ease, 
        padding 0.4s ease, 
        margin 0.4s ease;
    overflow: hidden;
    pointer-events: none;
}

/* Ensure the base item has transition properties */
.notice-item {
    /* ... your existing styles ... */
    transition: all 0.4s ease;
    max-height: 80px; /* Must match your fixed height */
}

/* Список уведомлений */
.notice-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden; /* Убирает горизонтальный скролл при анимации */
    position: relative;
    transition: height 0.3s ease;
}

/* Анимация для Clear All */
.notice-item.fade-all {
    opacity: 0;
    transform: translateX(100px); /* Улетает вправо */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Стили для сообщения "No new notes" */
.no-notes-message {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #b5b5b5;
    text-align: center;
    width: 100%;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.notice-icon-wrapper {
    position: relative;
    display: inline-block;
    width: 27px;
    height: 27px;
}

.notice-badge {
    position: absolute;
    /* Сдвигаем в правый верхний угол */
    top: -5px; 
    right: -5px;
    
    background-color: #d32f2f; /* Насыщенный красный цвет */
    color: white;
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: bold;
    
    /* Делаем идеальный круг */
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    
    /* Центрируем число внутри */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Белая обводка, если фон под иконкой темный (опционально) */
    border: 1.5px solid white; 
    padding: 1px;
    box-sizing: border-box;
    z-index: 10;
}