/* Compact notification drawer for the user panel. The data and Livewire actions remain Filament-native. */
#database-notifications .fi-modal-window {
    --gpu-notification-radius: 18px;
    width: min(430px, calc(100vw - 24px)) !important;
    max-width: 430px !important;
    height: auto !important;
    max-height: min(720px, calc(100vh - 24px)) !important;
    border-radius: var(--gpu-notification-radius) !important;
    overflow: hidden;
    box-shadow: 0 22px 60px rgb(15 23 42 / 18%);
}

#database-notifications .fi-modal-header {
    padding: 18px 20px 14px !important;
}

#database-notifications .fi-modal-content {
    padding: 0 !important;
}

#database-notifications .fi-modal-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px !important;
    border-top: 1px solid rgb(226 232 240 / 80%);
}

.gpu-notification-header {
    display: block;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

.gpu-notification-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}

.gpu-notification-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: rgb(37 99 235);
    background: rgb(239 246 255);
    border-radius: 11px;
}

.gpu-notification-heading-icon svg {
    width: 18px;
    height: 18px;
}

.gpu-notification-subtitle {
    margin: 3px 0 0;
    color: rgb(100 116 139);
    font-size: 12px;
}

.gpu-notification-count {
    margin-inline-start: 7px;
    vertical-align: middle;
}

.gpu-notification-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgb(226 232 240 / 75%);
}

.gpu-notification-list {
    max-height: min(52vh, 460px);
    overflow-y: auto;
    background: rgb(248 250 252 / 55%);
}

.gpu-notification-row {
    padding: 3px 12px 3px 20px;
    background: transparent;
    cursor: pointer;
    transition: background-color 120ms ease, transform 120ms ease;
}

.gpu-notification-row:hover {
    background: rgb(239 246 255 / 65%);
}

.gpu-notification-row:focus-visible {
    outline: 2px solid rgb(59 130 246);
    outline-offset: -2px;
}

.gpu-notification-row-unread {
    background: linear-gradient(90deg, rgb(239 246 255 / 85%), transparent);
}

.gpu-notification-row-unread::before {
    content: "";
    position: absolute;
    inset-block: 14px;
    inset-inline-start: 0;
    width: 3px;
    background: rgb(37 99 235);
    border-radius: 0 3px 3px 0;
}

.gpu-notification-row .fi-no-notification-title {
    color: rgb(15 23 42);
    font-size: 14px;
    font-weight: 650;
}

.gpu-notification-row .fi-no-notification-body {
    display: -webkit-box;
    overflow: hidden;
    color: rgb(71 85 105);
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-line;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.gpu-notification-row .fi-no-notification-date {
    color: rgb(148 163 184);
    font-size: 11px;
}

/* The whole card opens its detail view. Avoid a second destructive-looking close target. */
.gpu-notification-row .fi-no-notification-close-btn {
    display: none;
}

.gpu-notification-row::after {
    content: "查看";
    position: absolute;
    inset-block-start: 15px;
    inset-inline-end: 16px;
    color: rgb(37 99 235);
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 120ms ease;
}

.gpu-notification-row:hover::after {
    opacity: 1;
}

.gpu-notification-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgb(37 99 235);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.gpu-notification-footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.gpu-notification-footer-link svg {
    width: 15px;
    height: 15px;
}

#database-notifications .fi-modal-icon {
    width: 48px !important;
    height: 48px !important;
    margin-bottom: 12px !important;
}

#database-notifications .fi-modal-description {
    max-width: 280px;
    font-size: 13px;
}

@media (max-width: 640px) {
    #database-notifications .fi-modal-window {
        width: calc(100vw - 16px) !important;
        max-width: none !important;
    }
}
