/* Yourcloudweb announcements 2026-10-08
 * Scoped to WHMCS announcements index and detail views.
 * Existing WHMCS dynamic output, routes and integrations remain intact.
 */
body.ycw-portal.template-announcements,
body.ycw-portal.template-viewannouncement {
    --ycw-news-orange: #ff5900;
    --ycw-news-ink: #0d1b2f;
    --ycw-news-text: #61718b;
    --ycw-news-line: #e5ebf2;
}

body.ycw-portal .ycw-announcements {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin: 4px 0 24px;
}

body.ycw-portal .ycw-announcements .ycw-announcement-card,
body.ycw-portal .ycw-announcement-detail {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 20px 24px !important;
    color: #0d1b2f !important;
    background: #fff !important;
    border: 1px solid #e5ebf2 !important;
    border-radius: 17px !important;
    box-shadow: 0 8px 24px rgba(18, 35, 62, .055) !important;
}

body.ycw-portal .ycw-announcement-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    min-width: 0;
    margin: 0 0 12px;
}

body.ycw-portal .ycw-announcement-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 12px;
    margin: 0;
    color: #df4e00 !important;
    background: #fff1e9 !important;
    border: 1px solid #ffd8c1;
    border-radius: 9px;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

body.ycw-portal .ycw-announcements .ycw-announcement-title {
    flex: 1 1 220px;
    min-width: 0;
    margin: 0 !important;
    padding: 0;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
}

body.ycw-portal .ycw-announcements .ycw-announcement-title a,
body.ycw-portal .ycw-announcements .announcement-single a.title {
    display: inline;
    color: #0d1b2f !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    overflow-wrap: anywhere;
    text-decoration: none !important;
}

body.ycw-portal .ycw-announcements .ycw-announcement-title a:hover,
body.ycw-portal .ycw-announcements .ycw-announcement-title a:focus-visible {
    color: #e44e00 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

body.ycw-portal .ycw-announcements .ycw-announcement-excerpt {
    min-width: 0;
    padding: 14px 16px !important;
    margin: 0 !important;
    color: #61718b !important;
    background: #f8fafc !important;
    border: 1px solid #edf1f5 !important;
    border-left: 1px solid #edf1f5 !important;
    border-radius: 11px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere;
}

body.ycw-portal .ycw-announcements .ycw-announcement-excerpt p,
body.ycw-portal .ycw-announcements .ycw-announcement-excerpt blockquote {
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    background: transparent !important;
    border: 0 !important;
    font: inherit !important;
    line-height: inherit !important;
    text-align: left !important;
}
body.ycw-portal .ycw-announcements .ycw-announcement-excerpt p + p { margin-top: 8px !important; }

body.ycw-portal .ycw-announcements .ycw-announcement-excerpt a,
body.ycw-portal .ycw-announcement-detail-body a {
    color: #e45000 !important;
    font-weight: 600;
}

body.ycw-portal .ycw-announcements .ycw-announcement-social { margin-top: 14px; }

body.ycw-portal .ycw-announcement-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 28px;
}
body.ycw-portal .ycw-announcement-pagination a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 13px !important;
    margin: 0 !important;
    color: #24344d !important;
    background: #fff !important;
    border: 1px solid #dfe6ee !important;
    border-radius: 10px !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: none !important;
}
body.ycw-portal .ycw-announcement-pagination a.btn:hover,
body.ycw-portal .ycw-announcement-pagination a.btn.active {
    color: #fff !important;
    background: #ff5900 !important;
    border-color: #ff5900 !important;
}
body.ycw-portal .ycw-announcement-pagination a.btn.disabled { opacity: .48; pointer-events: none; }
body.ycw-portal .ycw-announcement-pagination a.btn:focus-visible,
body.ycw-portal .ycw-announcement-back:focus-visible {
    outline: 2px solid #ffad84 !important;
    outline-offset: 2px;
}

body.ycw-portal .ycw-announcement-detail {
    margin-bottom: 24px !important;
    padding: 24px 28px !important;
}
body.ycw-portal .ycw-announcement-detail .ycw-announcement-heading { margin-bottom: 18px; }
body.ycw-portal .ycw-announcement-detail-body {
    color: #42536d !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.8 !important;
    overflow-wrap: anywhere;
}
body.ycw-portal .ycw-announcement-detail-body p { margin: 0 0 14px; color: inherit !important; font: inherit !important; }
body.ycw-portal .ycw-announcement-detail-body blockquote {
    margin: 12px 0 16px !important;
    padding: 14px 18px !important;
    color: #596b85 !important;
    background: #f8fafc !important;
    border: 1px solid #edf1f5 !important;
    border-radius: 10px;
}
body.ycw-portal .ycw-announcement-detail-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #edf1f5;
}
body.ycw-portal .ycw-announcement-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 40px;
    padding: 10px 15px !important;
    color: #e45000 !important;
    background: #fff5ee !important;
    border: 1px solid #ffdac6 !important;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: none !important;
}
body.ycw-portal .ycw-announcement-back:hover {
    color: #fff !important;
    background: #ff5900 !important;
    border-color: #ff5900 !important;
}

/* Replace remaining legacy purple announcement accents, without changing global status colours. */
body.ycw-portal.template-announcements .announcement-single .article-items,
body.ycw-portal.template-viewannouncement .announcement-single .article-items { color: #e45000 !important; }

@media (max-width: 600px) {
    body.ycw-portal .ycw-announcements { gap: 12px; }
    body.ycw-portal .ycw-announcements .ycw-announcement-card,
    body.ycw-portal .ycw-announcement-detail {
        padding: 16px !important;
        border-radius: 14px !important;
    }
    body.ycw-portal .ycw-announcement-heading { gap: 9px 10px; }
    body.ycw-portal .ycw-announcements .ycw-announcement-title { flex-basis: 100%; font-size: 14px !important; }
    body.ycw-portal .ycw-announcements .ycw-announcement-excerpt { padding: 12px 14px !important; font-size: 12.5px !important; }
    body.ycw-portal .ycw-announcement-detail-body { font-size: 13px !important; }
}
