.mcem-alert-container {
    --alert-bg: var(--mcem-alert-color, #da8217);
    --alert-txt: var(--mcem-alert-text-color, #ffffff);
    margin: 1.5rem 0;
    border-radius: 14px;
    font-family: inherit;
    position: relative;
    background-color: var(--alert-bg) !important;
    color: var(--alert-txt) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.25s ease;
}

.mcem-alert-light-text {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.mcem-alert-dark-text {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45);
}

.mcem-alert-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    position: relative;
}

.mcem-alert-box .mcem-alert-inner {
    padding: 1.5rem 1.75rem;
}

.mcem-alert-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.mcem-alert-title {
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    margin: 0;
    color: inherit !important;
}

.mcem-alert-body {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.55;
    color: inherit !important;
    white-space: pre-line;
}

.mcem-alert-body p {
    margin: 0 0 0.4rem 0;
    color: inherit !important;
}
.mcem-alert-body p:last-child {
    margin-bottom: 0;
}

/* Date / Period Pill */
.mcem-alert-dates {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    line-height: 1.2;
}

.mcem-alert-light-text .mcem-alert-dates {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.mcem-alert-dark-text .mcem-alert-dates {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #000000;
}

.mcem-alert-dates-icon {
    flex-shrink: 0;
    opacity: 0.85;
}

/* Link Action Button */
.mcem-alert-link-wrapper {
    margin-top: 0.25rem;
}

.mcem-alert-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: inherit !important;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    width: fit-content;
}

.mcem-alert-light-text .mcem-alert-link {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.mcem-alert-light-text .mcem-alert-link:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.mcem-alert-dark-text .mcem-alert-link {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.mcem-alert-dark-text .mcem-alert-link:hover {
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    color: #000000 !important;
}

.mcem-alert-link:active {
    transform: scale(0.98);
}

.mcem-alert-link svg {
    flex-shrink: 0;
}

/* Icon on Right Side */
.mcem-alert-icon-side {
    width: 76px;
    min-width: 76px;
    max-width: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-left: 0.5rem;
}

.mcem-alert-icon-side img,
.mcem-alert-icon-side svg {
    width: 64px;
    height: 64px;
    max-height: 64px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.mcem-alert-light-text .mcem-alert-icon-side img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)) invert(1);
}

.mcem-alert-light-text .mcem-alert-icon-side svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
    stroke: currentColor;
    fill: none;
}

.mcem-alert-dark-text .mcem-alert-icon-side img {
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.4));
}

.mcem-alert-dark-text .mcem-alert-icon-side svg {
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.4));
    stroke: currentColor;
    fill: none;
}

/* Close Button (if enabled) */
.mcem-alert-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: inherit;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.mcem-alert-close:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(1.08);
}

/* Rotator & Multi-Alerts Carousel */
.mcem-alerts-rotator {
    position: relative;
    margin: 1.5rem 0;
    width: 100%;
}

.mcem-alerts-rotator .mcem-alert-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    height: 4px;
    background: rgba(0, 0, 0, 0.22);
    z-index: 10;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    overflow: hidden;
    pointer-events: none;
}

.mcem-alerts-rotator .mcem-alert-progress-bar {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    transition: width 0.08s linear;
}

.mcem-alerts-slides-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 14px;
    transition: height 0.3s ease;
}

.mcem-alerts-rotator .mcem-alert-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.45s ease, visibility 0.45s;
    pointer-events: none;
    z-index: 1;
}

.mcem-alerts-rotator .mcem-alert-slide.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
    z-index: 2;
}

.mcem-alerts-rotator .mcem-alert-slide.is-exiting {
    position: absolute;
    opacity: 0;
    visibility: visible;
    transform: translateX(-100%);
    pointer-events: none;
    z-index: 1;
}

.mcem-alerts-rotator .mcem-alert-slide.is-incoming {
    position: absolute;
    transform: translateX(100%);
    opacity: 0;
    visibility: visible;
    pointer-events: none;
    z-index: 2;
}

.mcem-alerts-rotator .mcem-alert-container {
    margin: 0 !important;
}

/* Rotator Controls / Counter / Dots */
.mcem-alert-rotator-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0 0.35rem;
}

.mcem-alert-rotator-counter {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
}

.mcem-alert-rotator-dots {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mcem-alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #cbd5e1;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.mcem-alert-dot:hover {
    background: #94a3b8;
    transform: scale(1.2);
}

.mcem-alert-dot.is-active {
    width: 22px;
    border-radius: 10px;
    background: var(--mcem-primary, #162c5b);
}

/* Multi-Alerts Stack Mode */
.mcem-alerts-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    width: 100%;
}

.mcem-alerts-stack .mcem-alert-container {
    margin: 0 !important;
}
.mcem-alert-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}

.mcem-alert-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mcem-alert-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mcem-alert-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    max-width: 520px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

.mcem-alert-modal-overlay.is-open .mcem-alert-modal-container {
    transform: scale(1) translateY(0);
}

.mcem-alert-modal-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    position: relative;
}

.mcem-alert-modal-icon-wrapper {
    flex-shrink: 0;
}

.mcem-alert-modal-header-text {
    flex: 1;
    min-width: 0;
}

.mcem-alert-modal-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: inherit;
    font-family: inherit;
}

.mcem-alert-modal-period {
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
}

.mcem-alert-modal-close {
    background: rgba(0, 0, 0, 0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease;
    padding: 0;
}

.mcem-alert-modal-close:hover {
    background: rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.mcem-alert-modal-body {
    padding: 24px;
    max-height: 65vh;
    overflow-y: auto;
    font-size: 15px;
    line-height: 1.65;
    color: #334155;
}

.mcem-alert-modal-content {
    white-space: pre-line;
    word-break: break-word;
}
