/**
 * Live Selling styles (child theme). Reuses AdForest's palette (dark #242424,
 * red accent). Covers: homepage LIVE NOW section, live badges, dashboard list
 * + form, single Live Session page, and the seller-profile live badge.
 */

/* ---- Live badge + pulsing dot ---- */
.adforest-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e11b46;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    line-height: 1;
}
.adforest-live-badge:hover { color: #fff; }
.adforest-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(255,255,255,.7);
    animation: adforest-live-pulse 1.4s infinite;
}
@keyframes adforest-live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.6); }
    70%  { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.adforest-live-badge--profile { margin-bottom: 8px; }

/* ---- Homepage LIVE NOW section ---- */
.adforest-live-now { padding: 30px 0; }
.adforest-live-now__head h3 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    margin-bottom: 18px;
}
.adforest-live-now__head .adforest-live-dot { background: #e11b46; }
.adforest-live-now__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}
.adforest-live-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}
.adforest-live-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.14); }
.adforest-live-card__thumb {
    position: relative;
    padding-top: 62%;
    background: #ececec center/cover no-repeat;
}
.adforest-live-card__thumb .adforest-live-badge { position: absolute; top: 10px; left: 10px; }
.adforest-live-viewers {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
}
.adforest-live-card__body { padding: 12px 14px; }
.adforest-live-card__title { font-weight: 700; font-size: 14px; line-height: 1.3; margin-bottom: 4px; }
.adforest-live-card__seller { font-size: 12.5px; color: #777; }

/* ---- Dashboard: list ---- */
.adforest-live-table { width: 100%; border-collapse: collapse; }
.adforest-live-table th, .adforest-live-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
    font-size: 13.5px;
}
.adforest-live-table .thumb {
    width: 74px; height: 48px; border-radius: 6px; object-fit: cover; background: #f0f0f0;
}
.adforest-live-status {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.adforest-live-status--upcoming { background: #eef3ff; color: #2c62d6; }
.adforest-live-status--live { background: #fde6ec; color: #e11b46; }
.adforest-live-status--ended { background: #eee; color: #666; }
.adforest-live-status--cancelled { background: #f7f7f7; color: #999; }
.adforest-live-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.adforest-live-actions .btn-sm,
.adforest-live-actions .adforest-live-action {
    font-size: 12px; padding: 6px 12px; border-radius: 6px; cursor: pointer;
    border: 1px solid #d9d9d9; background: #fff; color: #333; text-decoration: none; display: inline-block;
}
.adforest-live-actions .is-primary { background: #242424; color: #fff; border-color: #242424; }
.adforest-live-actions .is-danger { color: #e11b46; border-color: #f2c2ce; }
.adforest-live-empty { padding: 30px; text-align: center; color: #888; }

/* ---- Dashboard: form ---- */
.adforest-live-form .form-row { margin-bottom: 18px; }
.adforest-live-form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.adforest-live-form input[type="text"],
.adforest-live-form input[type="datetime-local"],
.adforest-live-form select,
.adforest-live-form textarea {
    width: 100%; padding: 10px 14px; border: 1px solid #e2e2e2; border-radius: 8px; font-size: 14px; background: #fafafa;
}
.adforest-live-form textarea { min-height: 110px; }
.adforest-live-form .thumb-preview {
    max-width: 220px; margin-top: 10px; border-radius: 8px; display: none;
}
.adforest-live-form .submit-btn {
    background: #242424; color: #fff; border: 0; border-radius: 8px; padding: 11px 26px; font-weight: 600; cursor: pointer;
}

/* ---- Single Live Session page ---- */
.adforest-live-single { padding: 30px 0 60px; }
.adforest-live-stage {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #10131a center/cover no-repeat;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}
.adforest-live-stage::before { content: ""; position: absolute; inset: 0; background: rgba(10,13,20,.55); }
.adforest-live-stage__inner { position: relative; z-index: 1; padding: 20px; }
.adforest-live-stage__soon {
    font-size: 15px; letter-spacing: .5px; text-transform: uppercase; opacity: .9; margin-top: 12px;
}
.adforest-live-stage .adforest-live-badge { position: absolute; top: 16px; left: 16px; z-index: 2; font-size: 13px; }
.adforest-live-meta { margin-top: 22px; }
.adforest-live-meta h1 { font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.adforest-live-meta .seller { color: #555; margin-bottom: 12px; }
.adforest-live-meta .seller a { color: #e11b46; text-decoration: none; }
.adforest-live-meta .sched { color: #777; font-size: 14px; }
.adforest-live-desc { margin: 18px 0; line-height: 1.6; color: #333; }
.adforest-live-placeholders { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-top: 26px; }
.adforest-live-panel {
    border: 1px dashed #d7d7d7; border-radius: 12px; padding: 20px; background: #fafafa; color: #888; text-align: center;
}
.adforest-live-panel h4 { color: #444; margin-bottom: 6px; font-size: 15px; }
.adforest-live-panel .soon-tag {
    display: inline-block; margin-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
    background: #eee; color: #888; padding: 3px 10px; border-radius: 20px;
}
@media (max-width: 767px) {
    .adforest-live-placeholders { grid-template-columns: 1fr; }
    .adforest-live-stage { min-height: 280px; }
}

/* ---- Embedded stream player (Streaming Integration) ---- */
.adforest-live-player { position: relative; }
.adforest-live-player .adforest-live-badge--stage {
    position: absolute; top: 14px; left: 14px; z-index: 3; font-size: 13px;
}
.adforest-live-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #10131a;
    border-radius: 14px;
    overflow: hidden;
}
.adforest-live-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.adforest-live-stage--ended {
    background: #10131a;
    color: #fff;
}
.adforest-live-stage--ended .adforest-live-stage__soon { text-transform: none; font-size: 16px; }

/* ---- Featured products under the stream ---- */
.adforest-live-products { margin-top: 28px; }
.adforest-live-products h3 { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.adforest-live-products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}
.adforest-live-product {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.adforest-live-product__img {
    display: block;
    padding-top: 68%;
    background: #f0f0f0 center/cover no-repeat;
}
.adforest-live-product__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.adforest-live-product__title {
    font-weight: 700; font-size: 14px; line-height: 1.3; color: #222; text-decoration: none;
}
.adforest-live-product__title:hover { color: #e11b46; }
.adforest-live-product__price { color: #e11b46; font-weight: 700; font-size: 15px; }
.adforest-live-product__actions { display: flex; gap: 8px; margin-top: auto; }
.adforest-live-product__view,
.adforest-live-product__buy {
    flex: 1; text-align: center; padding: 8px 10px; border-radius: 6px; font-size: 13px;
    font-weight: 600; text-decoration: none;
}
.adforest-live-product__view { border: 1px solid #d9d9d9; color: #333; background: #fff; }
.adforest-live-product__buy { background: #242424; color: #fff; }
.adforest-live-product__buy:hover { opacity: .9; color: #fff; }

@media (max-width: 767px) {
    .adforest-live-products__grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---- Live Chat (single session page) ---- */
.adforest-live-chat {
    display: flex;
    flex-direction: column;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    height: 440px;
}
.adforest-live-chat__head {
    padding: 12px 16px;
    font-weight: 700;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.adforest-live-chat__list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.adforest-chat-msg { position: relative; display: flex; gap: 10px; align-items: flex-start; }
.adforest-chat-msg__avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; background: #eee; }
.adforest-chat-msg__body { flex: 1; min-width: 0; }
.adforest-chat-msg__head { display: flex; align-items: baseline; gap: 8px; }
.adforest-chat-msg__name { font-weight: 700; font-size: 13px; color: #222; }
.adforest-chat-msg__time { font-size: 11px; color: #999; }
.adforest-chat-msg__text { font-size: 13.5px; line-height: 1.4; color: #333; word-wrap: break-word; overflow-wrap: anywhere; }
.adforest-chat-msg__del {
    position: absolute; top: 0; right: 0; border: 0; background: transparent; color: #bbb;
    cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px;
}
.adforest-chat-msg__del:hover { color: #e11b46; }
.adforest-chat-inline-note { font-size: 12.5px; color: #e11b46; text-align: center; padding: 4px; }
.adforest-live-chat__form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #f0f0f0; }
.adforest-live-chat__form input {
    flex: 1; border: 1px solid #e2e2e2; border-radius: 8px; padding: 9px 14px; font-size: 14px; background: #fafafa;
}
.adforest-live-chat__form button {
    border: 0; border-radius: 8px; background: #242424; color: #fff; padding: 9px 18px; font-weight: 600; cursor: pointer;
}
.adforest-live-chat__form button:disabled { opacity: .6; cursor: default; }
.adforest-live-chat__notice { padding: 12px 16px; border-top: 1px solid #f0f0f0; text-align: center; font-size: 13.5px; color: #777; }
.adforest-live-chat__notice a { color: #e11b46; font-weight: 600; text-decoration: none; }

/* ---- Live Chat moderation (dashboard) ---- */
.adforest-chat-mod { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; }
.adforest-chat-mod-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid #eee; border-radius: 10px; }
.adforest-chat-mod-row__avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #eee; }
.adforest-chat-mod-row__body { flex: 1; min-width: 0; }
.adforest-chat-mod-row__head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px; }
.adforest-chat-mod-row__head .time { font-size: 11px; color: #999; }
.adforest-chat-mod-row__text { font-size: 13.5px; color: #333; word-wrap: break-word; overflow-wrap: anywhere; }
.adforest-chat-mod-row__actions { display: flex; gap: 6px; flex: 0 0 auto; }
.adforest-chat-mod-row__actions .btn-sm {
    font-size: 12px; padding: 6px 10px; border-radius: 6px; border: 1px solid #d9d9d9; background: #fff; cursor: pointer;
}
.adforest-chat-mod-row__actions .btn-sm.is-danger { color: #e11b46; border-color: #f2c2ce; }
.adforest-chat-mod-row__actions .btn-sm:disabled { opacity: .5; cursor: default; }

/* ---- Live presence (viewer count) ---- */
.adforest-live-viewer-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fde6ec;
    color: #e11b46;
    font-weight: 700;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}
.adforest-live-viewer-badge .adforest-live-dot { background: #e11b46; }
.adforest-live-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 12.5px;
    color: #555;
    align-items: center;
}
.adforest-live-stats i { color: #e11b46; margin-right: 3px; }
.adforest-live-stats b { color: #222; }

/* ------------------------------------------------------------------ *
 * Feature 5 — Product Spotlight & Live Shopping
 * ------------------------------------------------------------------ */

/* Buyer featured-product box (single Live Session page, above the chat). */
.adforest-featured {
    background: #fff;
    border: 1px solid #f0d3db;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(225, 27, 70, .06);
    margin: 22px 0;
    overflow: hidden;
}
.adforest-featured__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(90deg, #fff2f5, #fff);
    border-bottom: 1px solid #f6e2e8;
    font-weight: 700;
    color: #e11b46;
    letter-spacing: .2px;
}
.adforest-featured__flame { font-size: 18px; line-height: 1; }
.adforest-featured__body { padding: 16px; }
.adforest-featured__empty {
    padding: 18px 6px;
    text-align: center;
    color: #999;
    font-style: italic;
}
.adforest-featured__card {
    display: flex;
    gap: 16px;
    align-items: stretch;
}
.adforest-featured__img {
    position: relative;
    flex: 0 0 190px;
    min-height: 150px;
    border-radius: 10px;
    background: #f4f4f6 center/cover no-repeat;
    display: block;
}
.adforest-featured__stock {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(20, 20, 20, .78);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}
.adforest-featured__countdown {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e11b46;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}
.adforest-featured__info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.adforest-featured__title {
    font-size: 17px;
    font-weight: 700;
    color: #1c1c1c;
    text-decoration: none;
    line-height: 1.3;
}
.adforest-featured__title:hover { color: #e11b46; }
.adforest-featured__price {
    color: #e11b46;
    font-weight: 800;
    font-size: 18px;
    margin: 6px 0;
}
.adforest-featured__desc {
    color: #666;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 12px;
}
.adforest-featured__actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
}
.adforest-featured__view,
.adforest-featured__buy {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    text-align: center;
}
.adforest-featured__view {
    background: #fbe7ec;
    color: #e11b46;
}
.adforest-featured__view:hover { background: #f7d3dd; }
.adforest-featured__buy {
    background: #e11b46;
    color: #fff;
}
.adforest-featured__buy:hover { background: #c40f36; }
@media (max-width: 560px) {
    .adforest-featured__card { flex-direction: column; }
    .adforest-featured__img { flex-basis: auto; width: 100%; min-height: 200px; }
}

/* Seller spotlight control panel (dashboard edit page). */
.adforest-spotlight__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.adforest-spotlight__hint {
    color: #888;
    font-size: 13px;
    margin: 0 0 14px;
}
.adforest-spotlight__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}
.adforest-spotlight__item {
    border: 1.5px solid #eee;
    border-radius: 12px;
    padding: 12px;
    transition: border-color .15s, box-shadow .15s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.adforest-spotlight__item.is-featured {
    border-color: #e11b46;
    box-shadow: 0 0 0 3px rgba(225, 27, 70, .12);
}
.adforest-spotlight__thumb {
    height: 120px;
    border-radius: 8px;
    background: #f4f4f6 center/cover no-repeat;
}
.adforest-spotlight__title {
    font-weight: 700;
    font-size: 14px;
    color: #222;
    line-height: 1.35;
}
.adforest-spotlight__price { color: #e11b46; font-weight: 700; font-size: 14px; }
.adforest-spotlight__stock { color: #777; font-size: 12px; }
.adforest-spotlight__meta { flex: 1 1 auto; min-width: 0; }
.adforest-spotlight-feature {
    width: 100%;
    background: #fbe7ec;
    color: #e11b46;
    border: 0;
    border-radius: 8px;
    padding: 9px 12px;
    font-weight: 700;
    cursor: pointer;
}
.adforest-spotlight-feature:hover { background: #f7d3dd; }
.adforest-spotlight-feature[disabled] { opacity: .6; cursor: default; }
.adforest-spotlight-feature .label-featured { display: none; }
.adforest-spotlight__item.is-featured .adforest-spotlight-feature {
    background: #e11b46;
    color: #fff;
    cursor: default;
}
.adforest-spotlight__item.is-featured .adforest-spotlight-feature .label-feature { display: none; }
.adforest-spotlight__item.is-featured .adforest-spotlight-feature .label-featured { display: inline; }
.adforest-spotlight-clear {
    background: #f3f3f5;
    color: #555;
    border: 0;
    border-radius: 8px;
    padding: 7px 14px;
    font-weight: 600;
    cursor: pointer;
}
.adforest-spotlight-clear:hover { background: #e9e9ec; }

/* ------------------------------------------------------------------ *
 * Feature 6 — Live Analytics dashboard
 * ------------------------------------------------------------------ */
.adforest-analytics__head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.adforest-analytics__totals {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    padding: 12px 4px 18px;
    color: #555;
    font-size: 13.5px;
}
.adforest-analytics__totals b { color: #e11b46; font-size: 16px; margin-right: 4px; }

.adforest-analytics__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.adforest-analytics__stat {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
    background: #fff;
}
.adforest-analytics__stat i { font-size: 20px; color: #e11b46; }
.adforest-analytics__stat-val { font-size: 20px; font-weight: 800; color: #1c1c1c; margin: 6px 0 2px; }
.adforest-analytics__stat-lbl { font-size: 12.5px; color: #777; }

.adforest-analytics__products { display: flex; flex-direction: column; gap: 14px; }
.adforest-analytics__product-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13.5px;
    margin-bottom: 6px;
}
.adforest-analytics__product-title { font-weight: 600; color: #222; }
.adforest-analytics__product-meta { color: #888; white-space: nowrap; }
.adforest-analytics__bar {
    height: 9px;
    border-radius: 6px;
    background: #f1f1f4;
    overflow: hidden;
}
.adforest-analytics__bar > span {
    display: block;
    height: 100%;
    background: #e11b46;
    border-radius: 6px;
}
.adforest-analytics__bar--blue > span { background: #2f80ed; }
.adforest-analytics__note { color: #999; font-size: 12px; margin-top: 14px; }
.adforest-analytics-table th, .adforest-analytics-table td { white-space: nowrap; }
