/* Top Doctor Announcement bar — full-width strip above the header.
   Brand primary (#0080ff) background, white text; the Read-more button is white with
   primary text (per spec). Sits above the sticky header via z-index. */

.top-announcement-bar {
    background-color: #0080ff;
    color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 110;
}

.top-announcement-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: nowrap; /* keep the bar a single row so the fixed offsets below stay valid */
    padding: 0.6rem 1.25rem;
    max-width: 1200px;
    margin: 0 auto;
}

.top-announcement-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.35;
    /* single line + ellipsis so a long title can't grow the bar height on small screens */
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Layout offsets applied ONLY when the Top Announcement bar is on screen. topAnnouncements.js
   adds .has-top-announcement to <body> when the bar renders. The bar is position:fixed at
   top:0, so the header / wrapper / sidebar are pushed down to clear it (desktop values). */
.has-top-announcement #kt_app_header {
    margin-top: 30px;
}

/* Sidebar needs !important to beat the theme's own sidebar margin rule. */
.has-top-announcement #kt_app_sidebar {
    margin-top: 50px !important;
}

/* lg+ : the theme already sets .app-wrapper margin-top: var(--bs-app-header-height) when the
   header is fixed. Keep that and ADD the bar's clearance on top of it. */
@media (min-width: 992px) {
    .has-top-announcement #kt_app_wrapper {
        margin-top: calc(var(--bs-app-header-height) + 20px);
    }
}

/* Responsive: below lg the header stacks taller (search/toolbar), so the bar clears a bit
   more. The single-row title keeps the bar height stable, so a small bump is enough. */
@media (max-width: 991.98px) {
    .has-top-announcement #kt_app_header {
        margin-top: 44px;
    }

    .has-top-announcement #kt_app_sidebar {
        margin-top: 0 !important;
    }
}

.top-announcement-btn {
    flex-shrink: 0;
    background-color: #ffffff;
    color: #0080ff;
    border: none;
    border-radius: 0.475rem;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.35rem 0.9rem;
    cursor: pointer;
    transition: opacity 0.15s ease-in-out;
}

.top-announcement-btn:hover {
    opacity: 0.9;
}

/* Close (X) — dismisses the bar (and ShowOnce announcements) for the doctor. */
.top-announcement-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 0.25rem;
    margin-left: 0.25rem;
    cursor: pointer;
    opacity: 0.8;
}

.top-announcement-close:hover {
    opacity: 1;
}

/* Rendered markdown inside the Read-more modal. */
.announcement-markdown {
    line-height: 1.6;
}

.announcement-markdown h1,
.announcement-markdown h2,
.announcement-markdown h3 {
    font-weight: 700;
    margin: 0.75rem 0 0.5rem;
}

.announcement-markdown p {
    margin: 0 0 0.75rem;
}

.announcement-markdown ul,
.announcement-markdown ol {
    padding-left: 1.35rem;
    margin: 0 0 0.75rem;
}

.announcement-markdown a {
    color: #0080ff;
    text-decoration: underline;
}

.announcement-markdown img {
    max-width: 100%;
    height: auto;
}

/* ---- Main Doctor Announcement modal — list rows ---- */
.main-ann-item {
    padding: 0.9rem 1rem;
    border: 1px solid #eff2f5;
    border-radius: 0.475rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.main-ann-item:hover {
    background-color: #f9fafb;
}

.main-ann-title {
    font-weight: 700;
    font-size: 1rem;
    color: #181c32;
    margin-bottom: 0.35rem;
}

.main-ann-desc {
    color: #5e6278;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    /* clamp the description preview to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
}

.main-ann-readmore {
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Banner image (Main / Non-Auth Main placements). Constrained so a tall upload
   cannot blow the modal out: the image scales to the pane width and is cropped
   to a consistent banner ratio.
   --------------------------------------------------------------------------- */
.announcement-image-wrap {
    margin-bottom: 1rem;
    border-radius: 0.475rem;
    overflow: hidden;
    background-color: #f5f8fa;
}

.announcement-image {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
