.un-notices-wrapper {
    --un-primary: #162b75;
    --un-primary-soft: rgba(22, 43, 117, 0.07);
    --un-border: #e5e9f0;
    --un-surface: #ffffff;
    --un-bg-subtle: #f8fafc;
    --un-text-main: #0f172a;
    --un-text-muted: #64748b;

    max-width: 1140px;
    margin: 28px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--un-text-main);
    box-sizing: border-box;
}

.un-notices-wrapper *,
.un-notices-wrapper *::before,
.un-notices-wrapper *::after {
    box-sizing: border-box;
}

/* Prevent any theme/global AJAX preloader overlay from attaching inside the notices wrapper */
.un-notices-wrapper .loader,
.un-notices-wrapper .preloader,
.un-notices-wrapper .spinner,
.un-notices-wrapper .loading,
.un-notices-wrapper .ajax-loader,
.un-notices-wrapper .blockOverlay {
    display: none !important;
    background: none !important;
}

/* Font Awesome 4.3.0 Icon Styling */
.un-notices-wrapper .fa {
    font-family: FontAwesome !important;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Toolbar: Count Info + Search & Sort */
.un-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.un-meta-info {
    display: flex;
    align-items: center;
}

.un-count-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--un-text-muted);
}

.un-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Search Input with Font Awesome 4.3.0 fa-search */
.un-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.un-search-box .un-fa-search {
    position: absolute;
    left: 12px;
    font-size: 13px;
    color: #94a3b8;
    pointer-events: none;
}

.un-search-input {
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--un-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--un-text-main);
    background-color: var(--un-surface);
    min-width: 230px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.un-search-input:focus {
    outline: none;
    border-color: var(--un-primary);
    box-shadow: 0 0 0 3px var(--un-primary-soft);
}

/* Sort Select */
.un-select {
    padding: 8px 14px;
    border: 1px solid var(--un-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--un-text-main);
    background-color: var(--un-surface);
    cursor: pointer;
    transition: border-color 0.18s ease;
}

.un-select:focus {
    outline: none;
    border-color: var(--un-primary);
}

/* Notices List Container */
.un-notices-list {
    border: 1px solid var(--un-border);
    border-radius: 10px;
    background-color: var(--un-surface);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

/* Individual Notice Row */
.un-notice-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--un-border);
    border-left: 3px solid transparent;
    background-color: var(--un-surface);
    transition: background-color 0.18s ease, border-left-color 0.18s ease;
}

.un-notice-item:last-child {
    border-bottom: none;
}

.un-notice-item:hover {
    background-color: #f8faff;
    border-left-color: var(--un-primary);
}

/* Left Calendar Date Tile */
.un-date-badge {
    flex-shrink: 0;
    width: 64px;
    padding: 8px 6px;
    border-radius: 8px;
    background-color: var(--un-bg-subtle);
    border: 1px solid var(--un-border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.un-notice-item:hover .un-date-badge {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

.un-date-day {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--un-primary);
}

.un-date-month {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--un-text-muted);
    margin-top: 2px;
}

.un-date-year {
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 1px;
}

/* Center Body */
.un-notice-body {
    flex: 1;
    min-width: 0;
}

.un-notice-meta-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.un-full-date {
    font-size: 12.5px;
    color: var(--un-text-muted);
}

.un-new-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.un-notices-wrapper .un-notice-title {
    margin: 0;
    font-size: 16.5px !important;
    font-weight: 500;
    line-height: 1.45;
}

.un-notices-wrapper .un-notice-title a {
    font-size: 16.5px !important;
    color: var(--un-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.un-notices-wrapper .un-notice-title a:hover {
    color: #0b1742;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Right Action Button */
.un-notice-action {
    flex-shrink: 0;
}

.un-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--un-primary);
    background-color: var(--un-bg-subtle);
    border: 1px solid var(--un-border);
    text-decoration: none;
    transition: all 0.18s ease;
}

.un-read-more .un-fa-arrow {
    font-size: 14px;
    transition: transform 0.18s ease;
}

.un-notice-item:hover .un-read-more,
.un-read-more:hover {
    background-color: var(--un-primary);
    border-color: var(--un-primary);
    color: #ffffff;
}

.un-read-more:hover .un-fa-arrow {
    transform: translateX(2px);
}

/* ==========================================================================
   Transparent Mode (transparent="yes") - Clean borderless/no-fill widget view
   ========================================================================== */
.un-notices-wrapper.un-is-transparent {
    margin: 0 auto;
}

.un-notices-wrapper.un-is-transparent .un-notices-list {
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.un-notices-wrapper.un-is-transparent .un-notice-item {
    background-color: transparent;
    padding: 15px 6px;
    border-left: none;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.un-notices-wrapper.un-is-transparent .un-notice-item:last-child {
    border-bottom: none;
}

.un-notices-wrapper.un-is-transparent .un-notice-item:hover {
    background-color: rgba(148, 163, 184, 0.08);
}

.un-notices-wrapper.un-is-transparent .un-date-badge {
    background-color: transparent;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.un-notices-wrapper.un-is-transparent .un-notice-item:hover .un-date-badge {
    background-color: transparent;
    border-color: var(--un-primary);
}

.un-notices-wrapper.un-is-transparent .un-read-more {
    background-color: transparent;
    border-color: rgba(148, 163, 184, 0.4);
}

.un-notices-wrapper.un-is-transparent .un-notice-item:hover .un-read-more,
.un-notices-wrapper.un-is-transparent .un-read-more:hover {
    background-color: var(--un-primary);
    border-color: var(--un-primary);
    color: #ffffff;
}

.un-notices-wrapper.un-is-transparent .un-search-input,
.un-notices-wrapper.un-is-transparent .un-select {
    background-color: transparent;
    border-color: rgba(148, 163, 184, 0.4);
}

/* Load More Button */
.un-load-more-wrap {
    text-align: center;
    margin-top: 26px;
}

.un-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--un-primary);
    color: #ffffff;
    border: none;
    padding: 11px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(22, 43, 117, 0.22);
    transition: transform 0.15s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.un-load-more-btn .un-fa-btn {
    font-size: 15px;
}

.un-load-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 43, 117, 0.28);
}

.un-load-more-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Empty State */
.un-no-posts {
    padding: 44px 24px;
    text-align: center;
}

.un-no-posts-title {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--un-text-main);
}

.un-no-posts-sub {
    margin: 0;
    font-size: 13.5px;
    color: var(--un-text-muted);
}

/* Responsive Adjustments */
@media (max-width: 720px) {
    .un-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .un-toolbar-right {
        width: 100%;
        margin-left: 0;
    }
    .un-search-box {
        flex: 1;
    }
    .un-search-input {
        width: 100%;
        min-width: 0;
    }
    .un-notice-item {
        flex-wrap: wrap;
        gap: 14px;
        padding: 16px 18px;
    }
    .un-notices-wrapper.un-is-transparent .un-notice-item {
        padding: 14px 4px;
    }
    .un-date-badge {
        width: 56px;
        padding: 6px 4px;
    }
    .un-date-day {
        font-size: 17px;
    }
    .un-notice-action {
        width: 100%;
        padding-left: 70px;
    }
    .un-read-more {
        padding: 6px 12px;
        font-size: 12px;
    }
}
