/* ============================================================================
   X-GORB Search — homepage news column + result thumbnails
   Flat Google News / Bing News language: thin rules, no glass, no image wash.
   ========================================================================== */

/* Section shell ----------------------------------------------------------- */
body.y-home .g-home-section.g-news {
    position: relative;
    max-width: 1120px !important;
    margin-top: 26px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--y-line);
    border-radius: 16px;
    background: var(--y-canvas);
    box-shadow: 0 1px 2px rgba(32, 33, 36, .04);
}

body.y-home .g-news-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 296px;
    align-items: stretch;
}

/* News column ------------------------------------------------------------- */
.g-news-col { min-width: 0; border-right: 1px solid var(--y-line); }

.g-news-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid var(--y-line);
}

.g-news-heading { display: flex; align-items: baseline; gap: 8px; min-width: 0; }

.g-news-title {
    margin: 0;
    color: var(--y-ink);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.g-news-sub {
    color: var(--y-ink-3);
    font-size: .7rem;
    white-space: nowrap;
}

.g-news-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    color: #1a73e8;
    font-size: .76rem;
    font-weight: 500;
    text-decoration: none;
}

.g-news-more:hover { text-decoration: underline; }
.g-news-more i { font-size: .6rem; }

[data-theme="dark"] .g-news-more { color: #8ab4f8; }

/* Two-column compact list — Google News row rhythm */
.g-news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-news-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 12px 18px;
    border-bottom: 1px solid var(--y-line);
    background: transparent;
    transition: background-color .15s ease;
}

.home-news-card:nth-child(odd) { border-right: 1px solid var(--y-line); }
.home-news-card:hover { background: var(--y-canvas-2); }
.home-news-card:last-child,
.home-news-card:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

.hn-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.hn-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--y-ink-3);
    font-size: .68rem;
    line-height: 1.3;
}

.hn-source {
    max-width: 150px;
    overflow: hidden;
    color: var(--y-ink-2);
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hn-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .45; }

.hn-title {
    margin: 0;
    color: var(--y-ink);
    font-size: .89rem;
    font-weight: 500;
    line-height: 1.42;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hn-title a { color: inherit; text-decoration: none; }
.home-news-card:hover .hn-title a { color: #1a73e8; }
[data-theme="dark"] .home-news-card:hover .hn-title a { color: #8ab4f8; }

.hn-desc {
    margin: 0;
    color: var(--y-ink-3);
    font-size: .75rem;
    line-height: 1.48;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hn-media {
    flex: 0 0 84px;
    width: 84px;
    height: 62px;
    overflow: hidden;
    border-radius: 7px;
    background: var(--y-canvas-2);
}

.hn-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-news-card.no-media .hn-title { -webkit-line-clamp: 3; }

.hn-empty,
.hot-empty {
    grid-column: 1 / -1;
    padding: 34px 14px;
    color: var(--y-ink-3);
    font-size: .8rem;
    text-align: center;
}

.hn-skeleton,
.hot-skeleton {
    border-radius: 6px;
    background: linear-gradient(90deg, var(--y-canvas-2) 25%, var(--y-line) 37%, var(--y-canvas-2) 63%);
    background-size: 400% 100%;
    animation: xgShimmer 1.4s ease infinite;
}

.hn-skeleton {
    height: 86px;
    margin: 12px 18px;
    border-radius: 8px;
}

.hn-skeleton:nth-child(n+3) { margin-top: 0; }
.hot-skeleton { height: 30px; margin: 4px 0; }

@keyframes xgShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Sidebar ---------------------------------------------------------------- */
.g-news-side {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    background: var(--y-canvas);
}

.g-side-card {
    min-width: 0;
    padding: 14px 16px;
    background: transparent;
}

.g-side-card + .g-side-card { border-top: 1px solid var(--y-line); }

.g-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.g-side-head h3 {
    margin: 0;
    color: var(--y-ink);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
}

.hot-list { display: flex; flex-direction: column; }

.hot-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 6px;
    border-radius: 6px;
    color: var(--y-ink);
    text-decoration: none;
    transition: background-color .14s ease;
}

.hot-item:hover,
.hot-item.is-active { background: var(--y-canvas-2); }

.hot-rank {
    flex: 0 0 14px;
    width: 14px;
    color: var(--y-ink-3);
    font-size: .68rem;
    font-weight: 700;
    text-align: center;
}

.hot-rank.is-top { color: #d93025; }

.hot-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: .78rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hot-value {
    flex: 0 0 auto;
    color: var(--y-ink-3);
    font-size: .63rem;
    transition: opacity .15s ease;
}

.hot-thumb {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 5px;
    background: var(--y-canvas-2);
    opacity: 0;
    transform: translateY(-50%) scale(.9);
    transition: opacity .16s ease, transform .16s ease;
    pointer-events: none;
}

.hot-item.is-active .hot-thumb,
.hot-item:hover .hot-thumb,
.hot-item:focus-visible .hot-thumb { opacity: 1; transform: translateY(-50%) scale(1); }
.hot-item.is-active .hot-value,
.hot-item:hover .hot-value,
.hot-item:focus-visible .hot-value { opacity: 0; }

.hot-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Services --------------------------------------------------------------- */
.g-services-card .g-services {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 6px;
}

.g-services-card .g-service {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    border-radius: 7px;
    color: var(--y-ink-2);
    font-size: .75rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .14s ease, color .14s ease;
}

.g-services-card .g-service:hover { background: var(--y-canvas-2); color: var(--y-ink); }
.g-services-card .g-service i { width: 14px; color: var(--y-ink-3); font-size: .76rem; text-align: center; }
.g-services-card .g-service:nth-child(3n+2) i { color: #1a73e8; }
.g-services-card .g-service:nth-child(3n) i { color: #188038; }

/* Daily image dropdown beside the shortcut editor ------------------------ */
.g-home-section__tools .bg-info-wrap { position: relative; margin-left: 0; }
.g-home-section__tools .bg-info-dropdown { top: calc(100% + 8px); right: 0; width: 300px; }

@media (max-width: 1024px) {
    body.y-home .g-news-shell { grid-template-columns: minmax(0, 1fr); }
    .g-news-col { border-right: 0; border-bottom: 1px solid var(--y-line); }
    .g-news-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .g-side-card + .g-side-card { border-top: 0; border-left: 1px solid var(--y-line); }
}

@media (max-width: 720px) {
    body.y-home .g-home-section.g-news { margin-top: 22px; border-radius: 12px; }
    .g-news-head { padding: 12px 14px 9px; }
    .g-news-grid { grid-template-columns: minmax(0, 1fr); }
    .home-news-card { padding: 11px 14px; }
    .home-news-card:nth-child(odd) { border-right: 0; }
    .home-news-card:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--y-line); }
    .home-news-card:last-child { border-bottom: 0; }
    .hn-media { flex-basis: 78px; width: 78px; height: 58px; }
    .g-news-side { grid-template-columns: minmax(0, 1fr); }
    .g-news-side .g-side-card + .g-side-card { border-left: 0; border-top: 1px solid var(--y-line); }
    .g-news-title { font-size: .94rem; }
    .hn-skeleton { margin: 10px 14px; }
}

@media (max-width: 480px) {
    .g-home-section__tools .bg-info-dropdown { width: min(300px, calc(100vw - 40px)); }
    .g-services-card .g-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Result thumbnails ------------------------------------------------------- */
body.page-search .result-card { position: relative; }
body.page-search .result-card.has-thumb {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
body.page-search .result-main { flex: 1 1 auto; min-width: 0; }

body.page-search .result-thumb {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    margin: 1px 0 0;
    overflow: hidden;
    border: 1px solid var(--y-line);
    border-radius: 8px;
    background: var(--y-canvas-2);
    transition: border-color .16s ease;
}

body.page-search .result-thumb:hover { border-color: var(--bing-blue, #1a73e8); }
body.page-search .result-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

body.page-news .news-result-item.has-thumb { display: flex; gap: 12px; align-items: flex-start; }
body.page-news .news-result-body { flex: 1 1 auto; min-width: 0; }

body.page-news .news-result-thumb {
    flex: 0 0 132px;
    width: 132px;
    height: 88px;
    overflow: hidden;
    border: 1px solid var(--y-line);
    border-radius: 8px;
    background: var(--y-canvas-2);
}

body.page-news .news-result-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
    body.page-search .result-card.has-thumb { gap: 10px; }
    body.page-search .result-thumb { flex-basis: 64px; width: 64px; height: 64px; margin-top: 2px; }
    body.page-news .news-result-item.has-thumb { gap: 10px; }
    body.page-news .news-result-thumb { flex-basis: 96px; width: 96px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-news-card,
    .home-news-card:hover,
    .hn-media img { transform: none !important; transition: none !important; }
    .hn-skeleton,
    .hot-skeleton { animation: none !important; }
}
