.announcement-management-page .table td,
.announcement-management-page .table th {
    vertical-align: middle;
}

.announcement-editor-dialog {
    max-width: min(52rem, calc(100vw - 2rem));
}

.announcement-editor-dialog .modal-header {
    padding: .85rem 1.25rem;
}

.announcement-editor-dialog .modal-body {
    padding: 1rem 1.25rem 1.1rem;
}

.announcement-editor-dialog .form-label {
    margin-bottom: .35rem;
    color: var(--bs-secondary-color);
    font-size: .875rem;
    font-weight: 600;
}

.announcement-editor-errors.validation-summary-valid {
    display: none;
}

.announcement-editor-errors {
    margin-bottom: .9rem;
    padding: .6rem .75rem;
    font-size: .84rem;
}

.announcement-editor-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

.announcement-required {
    color: var(--bs-danger);
}

.announcement-audience-options {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
}

.announcement-targeting {
    padding-top: .15rem;
}

.announcement-active-switch {
    margin-bottom: 0;
    padding: .1rem 0 .1rem 2.35rem;
}

.announcement-coverage-options {
    display: grid;
    gap: .3rem;
}

.announcement-editor-side .form-text {
    margin-top: .35rem;
    font-size: .78rem;
    line-height: 1.35;
}

.announcement-editor-side .announcement-audience-options {
    display: grid;
    gap: .3rem;
}

.announcement-editor-dialog .modal-footer {
    min-height: 3.75rem;
    padding: .7rem 1.25rem;
}

@media (min-width: 992px) {
    .announcement-editor-main {
        padding-right: .45rem;
    }

    .announcement-editor-side {
        min-width: 0;
        padding-left: .3rem;
    }
}

.announcement-status-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
}

.announcement-status-tabs[data-responsive-tabs-list] {
    overflow-x: visible;
}

.announcement-page-size {
    margin-left: auto;
    padding-left: .5rem;
    white-space: nowrap;
}

.announcement-page-size .form-select {
    width: 4.4rem;
}

.announcement-filter-toggle.is-filtered {
    box-shadow: 0 0 0 .15rem rgba(var(--bs-primary-rgb), .18);
}

.announcement-list-message {
    max-width: 36rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#announcementsGrid {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

#announcementsGrid th[data-col-key="announcement"],
#announcementsGrid td[data-col-key="announcement"],
#announcementsGrid th[data-col-key="visibility"],
#announcementsGrid td[data-col-key="visibility"] {
    text-align: left;
}

#announcementsGrid th[data-col-key="type"],
#announcementsGrid td[data-col-key="type"],
#announcementsGrid th[data-col-key="audience"],
#announcementsGrid td[data-col-key="audience"],
#announcementsGrid th[data-col-key="status"],
#announcementsGrid td[data-col-key="status"] {
    text-align: center;
    white-space: nowrap;
}

#announcementsGrid th[data-col-key="visibility"],
#announcementsGrid td[data-col-key="visibility"] {
    min-width: 24ch;
    white-space: nowrap;
}

.announcement-type-badge,
.announcement-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .18rem .5rem;
    background: #eef3fb;
    color: #38527a;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.announcement-status-badge.status-live { background: #e7f7ec; color: #207044; }
.announcement-status-badge.status-scheduled { background: #eef3fb; color: #38527a; }
.announcement-status-badge.status-expired,
.announcement-status-badge.status-inactive { background: #f1f3f5; color: #667085; }

@media (max-width: 575.98px) {
    .announcement-list-actions { width: 100%; }
    .announcement-list-actions .task-search-input { flex: 1 1 auto; width: auto; }
    .announcement-list-message { max-width: 13rem; }
}

.announcement-feed {
    --announcement-preview-lines: 3;
}

.marketing-page .announcement-feed {
    --announcement-preview-lines: 4;
}

.announcement-feed-item {
    border-width: 1px;
    box-shadow: 0 1px 0 rgba(15, 37, 63, .04);
    padding: .75rem .9rem;
}

/* Dashboard-only surface: public ticker and other shared feed uses retain their own presentation. */
.dashboard-announcement-feed .announcement-feed-item {
    background-color: #f8fbfd;
    border-color: rgba(19, 83, 119, .18);
    border-left-width: 3px;
    box-shadow: 0 2px 10px rgba(15, 37, 63, .05);
}

.dashboard-announcement-feed .announcement-feed-item.alert-warning { border-left-color: #c9901d; }
.dashboard-announcement-feed .announcement-feed-item.alert-primary { border-left-color: #2c7db8; }
.dashboard-announcement-feed .announcement-feed-item.alert-success { border-left-color: #2d9364; }
.dashboard-announcement-feed .announcement-feed-item.alert-info { border-left-color: #4c89a8; }

.announcement-feed-heading {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .28rem;
}

.announcement-feed-heading > i {
    font-size: .9rem;
}

.announcement-feed-heading h2 {
    margin: 0;
    color: inherit;
    font-size: .96rem;
    font-weight: 700;
    line-height: 1.25;
}

.announcement-feed-source-badge {
    background-color: #e7f3ff;
    border: 1px solid #b9dcf7;
    color: #0b5eaa;
}

.announcement-feed-message {
    color: inherit;
    font-size: .875rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.announcement-feed-message.is-collapsed {
    max-height: calc(1.5em * var(--announcement-preview-lines));
    overflow: hidden;
}

.announcement-feed-message p,
.announcement-feed-message ul,
.announcement-feed-message ol {
    margin: 0;
}

.announcement-feed-message > * + * {
    margin-top: .35rem;
}

.announcement-feed-message ul,
.announcement-feed-message ol {
    padding-left: 1.2rem;
}

.announcement-feed-message li + li {
    margin-top: .12rem;
}

.announcement-feed-message .announcement-message-heading {
    font-weight: 700;
}

.announcement-feed-message code {
    padding: .04rem .3rem;
    border-radius: .25rem;
    background: rgba(15, 37, 63, .08);
    color: inherit;
    font-size: .9em;
}

.announcement-feed-message a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.announcement-feed-toggle {
    display: inline-flex;
    min-height: auto;
    margin-top: .3rem;
    padding: 0;
    color: inherit;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.announcement-feed-toggle:hover,
.announcement-feed-toggle:focus-visible {
    color: inherit;
}

.announcement-ticker {
    --ticker-fg: #17643b;
    border-bottom: 1px solid #b9e4c9;
    background: #edf9f0;
    color: var(--ticker-fg);
    position: sticky;
    top: 0;
    z-index: 101;
    font-family: "Mooi Poppins", Poppins, system-ui, sans-serif;
}

.marketing-home .marketing-header {
    top: var(--announcement-ticker-height, 0px);
}

.announcement-ticker-inner {
    display: flex;
    align-items: center;
    min-height: 2.25rem;
    gap: .35rem;
}

.announcement-ticker-message {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    gap: .55rem;
    padding: .35rem 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 13px !important;
    font-weight: 500;
    text-align: left;
}

.announcement-ticker-viewport {
    display: block;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.announcement-ticker-text {
    display: inline-flex;
    align-items: baseline;
    gap: .5rem;
    min-width: max-content;
}

.announcement-ticker-title {
    color: #135b35;
    font-weight: 600;
}

.announcement-ticker-separator {
    color: #37885a;
}

.announcement-ticker-summary {
    color: #17643b;
    font-weight: 500;
}

.announcement-ticker.is-overflow .announcement-ticker-text {
    animation: announcement-ticker-scroll var(--announcement-ticker-duration, 16s) linear infinite;
    animation-fill-mode: both;
}

.announcement-ticker:hover .announcement-ticker-text,
.announcement-ticker:focus-within .announcement-ticker-text {
    animation-play-state: paused;
}

.announcement-ticker-dismiss,
.announcement-ticker-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8rem;
    height: 1.8rem;
    flex: 0 0 auto;
    padding: 0;
    border-radius: .4rem;
    color: inherit;
}

.announcement-ticker-dismiss {
    width: 1.8rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #17643b;
}

.announcement-ticker-dismiss > span,
.announcement-ticker-dialog-close > span {
    display: block;
    font-size: 1.45rem;
    font-weight: 300;
    line-height: 1;
}

.announcement-ticker-dismiss:hover,
.announcement-ticker-dismiss:focus-visible {
    background: rgba(23, 100, 59, .10);
    color: #135b35;
}

.announcement-ticker-dialog-close {
    border: 0;
    background: transparent;
}

.announcement-ticker-dialog-close:hover,
.announcement-ticker-dialog-close:focus-visible {
    background: #edf3f7;
    color: #10263f;
}

.announcement-ticker-dialog {
    width: min(34rem, calc(100vw - 2rem));
    max-height: min(75vh, 38rem);
    padding: 0;
    border: 0;
    border-radius: .75rem;
    box-shadow: 0 1rem 3rem rgba(15, 37, 63, .28);
    color: #10263f;
    font-family: "Mooi Poppins", Poppins, system-ui, sans-serif;
}

.announcement-ticker-dialog::backdrop { background: rgba(15, 37, 63, .42); }

.announcement-ticker-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem .75rem;
    border-bottom: 1px solid #e6ebf0;
}

.announcement-ticker-dialog-type {
    display: block;
    margin-bottom: .15rem;
    color: #62748a;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.announcement-ticker-dialog h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.announcement-ticker-dialog-close { color: #53667b; }
.announcement-ticker-dialog-body { padding: 1rem 1.1rem 1.15rem; overflow: auto; }

@keyframes announcement-ticker-scroll {
    0% { opacity: 1; transform: translateX(var(--announcement-ticker-enter, 0px)); }
    100% { opacity: 1; transform: translateX(var(--announcement-ticker-shift, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
    .announcement-ticker.is-overflow .announcement-ticker-text { animation: none; }
}

@media (max-width: 575.98px) {
    .announcement-management-page .table {
        min-width: 47rem;
    }
}
