/* ============================================================
   Chaturbate Affiliate Cams Widget — Frontend Styles v6.3
   ============================================================ */

/* ── Grid wrapper ────────────────────────────────────────── */
.chaturbate-cams-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.chaturbate-cams-container {
    display: grid;
    grid-template-columns: repeat(var(--cbw-columns-desktop, 4), 1fr);
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Card ────────────────────────────────────────────────── */
.chaturbate-cam-item {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.07),
        0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.chaturbate-cam-item:hover {
    transform: translateY(-4px);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.13);
}

/* ── Thumbnail ───────────────────────────────────────────── */
.chaturbate-cam-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 */
    overflow: hidden;
    background: #e9ecef;
}

.chaturbate-cam-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.chaturbate-cam-item:hover .chaturbate-cam-thumbnail img {
    transform: scale(1.06);
}

.chaturbate-cam-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    font-size: 13px;
    color: #868e96;
    font-weight: 500;
}

/* LIVE badge */
.chaturbate-cam-live {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e03131;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(224, 49, 49, 0.4);
}

/* NEW badge */
.chaturbate-cam-new-badge {
    background: #f76707;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ── Card body ───────────────────────────────────────────── */
.chaturbate-cam-info {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Username row */
.chaturbate-cam-username {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.chaturbate-cam-username a {
    color: var(--cbw-text, #1a1a1a);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.chaturbate-cam-username a:hover {
    color: var(--cbw-primary, #0093F2);
}

/* Room goal */
.chaturbate-cam-goal {
    font-size: 11.5px;
    color: #6c757d;
    font-style: italic;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stats row: gender icon · age · show type · viewers */
.chaturbate-cam-stats {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--cbw-text, #1a1a1a);
    flex-wrap: wrap;
}

.chaturbate-cam-gender {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.cb-gender-icon {
    width: 15px;
    height: 15px;
    vertical-align: middle;
}

/* Age pill */
.chaturbate-cam-age {
    background: var(--cbw-primary, #0093F2);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
}

.chaturbate-cam-show {
    text-transform: capitalize;
    color: #6c757d;
    font-size: 11.5px;
}

.chaturbate-cam-viewers {
    margin-left: auto;
    white-space: nowrap;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--cbw-text, #1a1a1a);
}

/* ── Tags row ────────────────────────────────────────────── */
.chaturbate-cam-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.chaturbate-cam-tag {
    display: inline-block;
    background: #f1f3f5;
    color: #495057;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    line-height: 1.5;
    white-space: nowrap;
    text-transform: lowercase;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chaturbate-cam-tag:hover {
    background: var(--cbw-primary, #0093F2);
    color: #fff;
    border-color: var(--cbw-primary, #0093F2);
}

/* ── Extra stats (uptime + location) ─────────────────────── */
.chaturbate-cam-extra-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #868e96;
    padding-top: 8px;
    margin-top: 2px;
    border-top: 1px solid #f1f3f5;
}

.chaturbate-cam-uptime {
    white-space: nowrap;
}

.chaturbate-cam-location {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 62%;
    text-align: right;
}

/* ── Affiliate link reset ────────────────────────────────── */
.chaturbate-affiliate-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ── Pagination ──────────────────────────────────────────── */
.chaturbate-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 28px 0 8px;
    width: 100%;
}

.chaturbate-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: var(--cbw-text, #1a1a1a);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.chaturbate-page-link:hover {
    background: var(--cbw-primary, #0093F2);
    color: #fff;
    border-color: var(--cbw-primary, #0093F2);
    box-shadow: 0 2px 6px rgba(0, 147, 242, 0.3);
}

.chaturbate-page-current {
    background: var(--cbw-primary, #0093F2);
    color: #fff !important;
    border-color: var(--cbw-primary, #0093F2);
    box-shadow: 0 2px 6px rgba(0, 147, 242, 0.3);
    cursor: default;
    pointer-events: none;
}

/* ── Responsive breakpoints ──────────────────────────────── */
@media (max-width: 1199px) {
    .chaturbate-cams-container {
        grid-template-columns: repeat(var(--cbw-columns-laptop, 3), 1fr);
    }
}

@media (max-width: 991px) {
    .chaturbate-cams-container {
        grid-template-columns: repeat(var(--cbw-columns-tablet, 2), 1fr);
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .chaturbate-cams-container {
        grid-template-columns: repeat(var(--cbw-columns-mobile, 1), 1fr);
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .chaturbate-cam-info { padding: 10px 12px 12px; }
    .chaturbate-cam-username a { font-size: 13px; }
    .chaturbate-cam-stats { font-size: 11px; }
}

/* ── Force CSS variable columns (caching fallback) ───────── */
.chaturbate-cams-container[style*="--cbw-columns-desktop"] {
    grid-template-columns: repeat(var(--cbw-columns-desktop), 1fr) !important;
}
@media (max-width: 1199px) {
    .chaturbate-cams-container[style*="--cbw-columns-laptop"] {
        grid-template-columns: repeat(var(--cbw-columns-laptop), 1fr) !important;
    }
}
@media (max-width: 991px) {
    .chaturbate-cams-container[style*="--cbw-columns-tablet"] {
        grid-template-columns: repeat(var(--cbw-columns-tablet), 1fr) !important;
    }
}
@media (max-width: 767px) {
    .chaturbate-cams-container[style*="--cbw-columns-mobile"] {
        grid-template-columns: repeat(var(--cbw-columns-mobile), 1fr) !important;
    }
}

/* ── Widget container reset ──────────────────────────────── */
.widget_chaturbate_cams_widget { width: 100%; }
.widget_chaturbate_cams_widget .chaturbate-cams-wrapper { max-width: 100%; }
.widget_chaturbate_cams_widget .widget-title {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--cbw-text, #1a1a1a);
}

/* ── Error / loading states ──────────────────────────────── */
.chaturbate-cams-error {
    background: #fff5f5;
    color: #c92a2a;
    padding: 14px 16px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ffc9c9;
    width: 100%;
}

.chaturbate-cams-loading {
    text-align: center;
    padding: 24px;
    color: #868e96;
    width: 100%;
}
