/* ==========================================================
        THEME VARIABLES
        ========================================================== */
:root {
    --notice-from: #312e81;
    --notice-to: #6d28d9;
    --notice-shadow: 49, 46, 129;
    --theme-link: #4338ca;
    --theme-link-hover: #312e81;
    --theme-border: #e0e7ff;
}

/* ---------- Utilities ---------- */
.blink {
    animation: blinker 1.5s cubic-bezier(0.5, 0, 1, 1) infinite alternate;
}

@keyframes blinker {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

ol>li {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* ==========================================================
        IMPORTANT NOTICE BOX
        ========================================================== */
.simple-notice {
    background: #f5f7ff;
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    padding: 24px !important;
    box-shadow:
        0 2px 4px rgba(var(--notice-shadow), 0.06),
        0 12px 32px rgba(var(--notice-shadow), 0.12);
    transition: none;
}

.simple-notice:hover {
    transform: none;
    box-shadow:
        0 2px 4px rgba(var(--notice-shadow), 0.06),
        0 12px 32px rgba(var(--notice-shadow), 0.12);
}

.simple-notice::before {
    display: none;
}

/* ---------- Header: Important Notice + View All ---------- */
.notice-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: -24px -24px 20px;
    padding: 18px 24px;
    background:
        radial-gradient(circle at 92% -20%,
            rgba(255, 255, 255, 0.22),
            transparent 45%),
        radial-gradient(circle at 70% 140%,
            rgba(255, 255, 255, 0.12),
            transparent 40%),
        linear-gradient(135deg,
            var(--notice-from) 0%,
            var(--notice-to) 100%);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.notice-badge::after {
    content: none;
    display: none;
}

.notice-badge i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 15px;
}

/* ---------- View All button ---------- */
.view-all-notices {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 13px;

    border: 1px solid #379d32;
    border-radius: 999px;

    background: #379d32;
    color: #fff !important;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;

    transition: background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.view-all-notices:hover {
    background: #fff;
    border-color: #fff;
    color: #000 !important;
    transform: translateX(2px);
}

.view-all-notices i {
    width: auto;
    height: auto;
    background: transparent;
    color: inherit;
    font-size: 10px;
}

/* ==========================================================
        NOTIFICATION ROWS
        ========================================================== */
a.notice-item,
a.notice-item:hover,
a.notice-item:focus {
    color: #1f2937;
    text-decoration: none;
}

a.notice-item {
    --c: var(--notice-to);
    --c-soft: #ede9fe;

    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid var(--theme-border);
    border-left: 5px solid var(--c);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(var(--notice-shadow), 0.06);
    transition:
        box-shadow 0.18s ease,
        transform 0.18s ease,
        border-color 0.18s ease;
}

a.notice-item:last-child {
    margin-bottom: 0;
}

a.notice-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(var(--notice-shadow), 0.16);
}

/* Different colours for each notification row */
.card-body>a.notice-item:nth-child(4n + 1) {
    --c: #6d28d9;
    --c-soft: #ede9fe;
}

.card-body>a.notice-item:nth-child(4n + 2) {
    --c: #2563eb;
    --c-soft: #dbeafe;
}

.card-body>a.notice-item:nth-child(4n + 3) {
    --c: #059669;
    --c-soft: #d1fae5;
}

.card-body>a.notice-item:nth-child(4n + 4) {
    --c: #ea580c;
    --c-soft: #ffedd5;
}

/* ---------- Notification icon ---------- */
.notice-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--c-soft);
    color: var(--c);
    font-size: 18px;
}

/* ---------- Notification details ---------- */
.notice-details {
    flex: 1;
    min-width: 0;
}

.notice-title {
    margin-bottom: 5px;
    color: #111827 !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

a.notice-item:hover .notice-title {
    color: var(--c) !important;
}

/* ---------- Notification dates ---------- */
.notice-date {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280 !important;
    font-size: 12px;
}

.notice-date i {
    color: var(--c) !important;
}

/* ---------- Arrow ---------- */
.notice-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    margin-left: 8px;
    border-radius: 50%;
    background: var(--c-soft);
    color: var(--c);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    padding-bottom: 2px;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

a.notice-item:hover .notice-arrow {
    background: var(--c);
    color: #fff;
    transform: translateX(3px);
}

/* ---------- Empty notification state ---------- */
.notice-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 16px 32px;
    text-align: center;
    background: #fff;
    border: 1px dashed #c7d2fe;
    border-radius: 12px;
}

.notice-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 50%;
    background: #ede9fe;
    color: var(--notice-to);
    font-size: 24px;
    box-shadow: 0 0 0 8px #f5f3ff;
}

.notice-empty-title {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.notice-empty-text {
    margin: 0;
    max-width: 340px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* ---------- New badge ---------- */
.new-badge {
    display: inline-block;
    background-color: #ff3b4f;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ==========================================================
        MAIN CONTENT CARD
        ========================================================== */
.simple-card {
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(var(--notice-shadow), 0.10);
    transition: box-shadow 0.2s ease;
}

.simple-card:hover {
    box-shadow: 0 4px 16px rgba(var(--notice-shadow), 0.16);
}

.simple-header {
    background: linear-gradient(135deg,
            var(--notice-from) 0%,
            var(--notice-to) 100%);
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.main-content-text {
    color: #495057;
    line-height: 1.6;
}

.main-content-text a {
    color: var(--theme-link);
    font-weight: 500;
    text-decoration: none;
}

.main-content-text a:hover {
    color: var(--theme-link-hover);
    text-decoration: underline;
}

/* ---------- Content text ---------- */
.content-text {
    color: #fff;
    line-height: 1.7;
    font-size: 1.05rem;
    font-weight: 500;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.content-text a {
    color: #fff !important;
}

.content-text a:hover {
    color: #76ccdf !important;
    text-decoration: underline !important;
}

.marker {
    color: #f8d189 !important;
}

.content-text a:has(.marker),
.content-text a:has(.marker):hover {
    text-decoration: none !important;
}

.content-text::-webkit-scrollbar {
    width: 8px;
}

.content-text::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.content-text::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.content-text::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.bg-light>a {
    color: #fff !important;
}

/* ---------- Close button ---------- */
.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ==========================================================
        RESPONSIVE
        ========================================================== */
@media (max-width: 768px) {
    .container-padding {
        padding: 1rem;
    }

    .simple-notice {
        padding: 16px !important;
        border-radius: 12px;
    }

    .notice-badge {
        margin: -16px -16px 16px;
        padding: 14px 16px;
        font-size: 15px;
    }

    .view-all-notices {
        padding: 6px 9px;
        font-size: 10px;
    }

    a.notice-item {
        gap: 10px;
        padding: 12px;
    }

    .notice-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 15px;
    }

    .notice-title {
        font-size: 14px;
    }

    .notice-arrow {
        width: 30px;
        height: 30px;
        min-width: 30px;
        margin-left: 4px;
        font-size: 20px;
    }

    .notice-empty {
        padding: 28px 12px 24px;
    }

    .notice-empty-icon {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
}

@media (max-width: 380px) {
    .notice-badge {
        gap: 6px;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 13px;
    }

    .view-all-notices {
        gap: 4px;
        padding: 5px 7px;
        font-size: 9px;
    }

    a.notice-item {
        gap: 8px;
        padding: 10px;
    }

    .notice-arrow {
        width: 26px;
        height: 26px;
        min-width: 26px;
        margin-left: 0;
    }
}