/* ---------------------------------------------------------------------------
   Category listing pages: /country-chat, /chat-rooms, /free-chat-rooms
   (resources/views/theme/country_chat.blade.php)

   Presentation only. No markup, link, ad slot or SEO change - every rule below
   restyles what the template already renders.

   Palette matches css/style.css:
     #db5a5a accent  ·  #4e5860 headings  ·  #ebece7 light  ·  #494949 nav

   NOTE ON SPECIFICITY: style.css targets these rows through `#list_section`
   (e.g. `#list_section .list-group-item .list_img`), which is 1,2,0. A plain
   `.cc .list_img` would lose, so the overrides here keep `#list_section` in the
   selector and add `.cc` on top of it.
--------------------------------------------------------------------------- */

.cc {
    --accent: #db5a5a;
    --accent-deep: #b83f3f;
    --accent-wash: #fdf2f2;
    --ink: #3c4249;
    --body: #63666a;
    --line: #e6e7e3;
    --paper: #fff;
    --radius: 14px;
    --lift: 0 10px 28px rgba(35, 37, 40, .09);
}

/* ---- shell -------------------------------------------------------------- */

.cc .panel-default {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--lift);
    overflow: hidden;
}
.cc .panel-body { padding: clamp(18px, 3vw, 34px); }

.cc #list_section .heading_h1 {
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
    margin: 0 0 4px;
}
/* Small lead-in under the H1, pulled from the category count. */
.cc .cc-sub {
    color: var(--body);
    font-size: 13.5px;
    margin: 0 0 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

/* ---- room rows ---------------------------------------------------------- */

.cc #list_section .list-group { border-radius: 0; }

.cc #list_section .list-group-item {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    background: var(--paper);
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.cc #list_section .list-group-item:hover {
    background: #fcfcfb;
    border-color: var(--line);
    transform: translateX(2px);
    box-shadow: 0 4px 14px rgba(35, 37, 40, .07);
}

/* rank badge */
.cc #list_section .list-group-item .count_list {
    padding: 0;
    margin-right: 14px;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-wash);
    color: var(--accent-deep);
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

/* flag / room thumbnail - these are real images from pages.post_image */
.cc #list_section .list-group-item .list_img {
    width: 58px;
    height: 44px;
    border-radius: 6px;
    margin-right: 15px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #f7f7f6;
    flex: 0 0 58px;
}
.cc #list_section .list-group-item .list_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cc #list_section .list-group-item h2 {
    /* style.css line 421 forces `h2 { font-size: 24px !important }` sitewide,
       so this needs !important to land at a sane listing size. */
    font-size: 16px !important;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 3px;
}
.cc #list_section .list-group-item h2 a { color: var(--ink); }
.cc #list_section .list-group-item:hover h2 a { color: var(--accent-deep); }

.cc #list_section .list-media-card-subtitle {
    font-size: 13px;
    line-height: 1.55;
    color: var(--body);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- pagination --------------------------------------------------------- */

.cc .paginator { margin: 22px 0 8px; }
.cc .pagination { margin: 0; }
.cc .pagination > li > a,
.cc .pagination > li > span {
    border: 1px solid var(--line);
    color: var(--ink);
    margin: 0 4px 4px 0;
    border-radius: 9px !important;
    padding: 8px 14px;
    font-weight: 600;
}
.cc .pagination > li > a:hover {
    border-color: var(--accent);
    color: var(--accent-deep);
    background: var(--accent-wash);
}
.cc .pagination > .active > span,
.cc .pagination > .active > span:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.cc .pagination > .disabled > span { color: #b9bcbf; background: #fafafa; }

/* ---- category copy ($info->content, author-managed HTML) ---------------- */

.cc .cc-copy {
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    line-height: 1.75;
    color: var(--body);
}
.cc .cc-copy p { margin: 0 0 1.05em; }
.cc .cc-copy a { color: var(--accent-deep); text-decoration: underline; }
.cc .cc-copy a:hover { color: var(--accent); }
.cc .cc-copy strong, .cc .cc-copy b { color: var(--ink); }
.cc .cc-copy h2, .cc .cc-copy h3, .cc .cc-copy h4 {
    color: var(--ink);
    font-weight: 700;
    margin: 1.6em 0 .5em;
    font-size: 18px !important;
}

/* ---- sidebar ------------------------------------------------------------ */

.cc .cc-aside { position: relative; }
@media (min-width: 992px) {
    /* Follows the long room list without leaving the sidebar stranded. */
    .cc .cc-aside { position: sticky; top: 18px; }
}
.cc .cc-aside > center span i { font-style: normal; letter-spacing: .08em; text-transform: uppercase; }

.cc .cc-aside article {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    padding: 0;
    transition: box-shadow .16s ease, transform .16s ease;
}
.cc .cc-aside article:hover { box-shadow: var(--lift); transform: translateY(-2px); }
.cc .cc-aside .herald-post-thumbnail {
    background: #f2f2f0;
    /* The source images are 300x225 and were rendering full height, dwarfing
       the room list beside them. */
    height: 150px;
    overflow: hidden;
}
.cc .cc-aside .herald-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cc .cc-aside .entry-header { padding: 12px 14px 14px; }
.cc .cc-aside .entry-title {
    font-size: 15px !important;
    line-height: 1.35;
    font-weight: 700;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cc .cc-aside .entry-title a { color: var(--ink); }
.cc .cc-aside .entry-title a:hover { color: var(--accent-deep); }

/* ---- top blog strip ----------------------------------------------------- */

.cc-trending .herald-post-thumbnail {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 46px;
    margin-right: 10px;
}
.cc-trending .herald-post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.cc-trending .d-flex { display: flex; align-items: center; }
.cc-trending h4 {
    font-size: 12.5px;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cc-trending h4 a { color: #5c6066; }
.cc-trending h4 a:hover { color: #b83f3f; }

/* ---- focus: Bootstrap 3's dotted outline on click ---------------------- */

.cc a:focus:not(:focus-visible),
.cc-trending a:focus:not(:focus-visible) { outline: none; }
.cc a:focus-visible,
.cc-trending a:focus-visible {
    outline: 3px solid rgba(219, 90, 90, .45);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .cc * { transition: none !important; }
    .cc #list_section .list-group-item:hover,
    .cc .cc-aside article:hover { transform: none; }
}
