/* ==========================================================================
   Общие стили
   ========================================================================== */

.bongacams-grid,
.bongacams-widget-grid {
    box-sizing: border-box;
    font-family: inherit;
}

.bongacams-card,
.bongacams-widget-card {
    box-sizing: border-box;
}

/* ==========================================================================
   Сетка моделей (шорткод)
   ========================================================================== */

.bongacams-grid-wrapper {
    margin: 20px 0;
    position: relative;
}

.bongacams-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* количество колонок управленияется классом bongacams-cols-N */
.bongacams-cols-2 .bongacams-card { width: calc(50% - 16px); }
.bongacams-cols-3 .bongacams-card { width: calc(33.333% - 16px); }
.bongacams-cols-4 .bongacams-card { width: calc(25% - 16px); }
.bongacams-cols-5 .bongacams-card { width: calc(20% - 16px); }
.bongacams-cols-6 .bongacams-card { width: calc(16.666% - 16px); }

@media (max-width: 1024px) {
    .bongacams-cols-4 .bongacams-card,
    .bongacams-cols-5 .bongacams-card,
    .bongacams-cols-6 .bongacams-card {
        width: calc(33.333% - 16px);
    }
}

@media (max-width: 768px) {
    .bongacams-cols-3 .bongacams-card,
    .bongacams-cols-4 .bongacams-card,
    .bongacams-cols-5 .bongacams-card,
    .bongacams-cols-6 .bongacams-card {
        width: calc(50% - 16px);
    }
}

@media (max-width: 480px) {
    .bongacams-card {
        width: 100% !important;
    }
}

.bongacams-card {
    background: #111;
    border-radius: 6px;
    overflow: hidden;
    color: #eee;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.bongacams-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    border-color: #e91e63;
}

.bongacams-thumb {
    position: relative;
    overflow: hidden;
    line-height: 0;
}

.bongacams-thumb img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.bongacams-card:hover .bongacams-thumb img {
    transform: scale(1.03);
}

/* Верхняя часть карточки: логин + display_name */
.bongacams-card-header {
    padding: 6px 8px 0;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bongacams-username {
    font-weight: 600;
    color: #fff;
    word-break: break-word;
}

.bongacams-display-name {
    font-size: 12px;
    color: #bbb;
    word-break: break-word;
}

/* Тело карточки: subject + meta */
.bongacams-card-body {
    padding: 4px 8px 8px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bongacams-subject {
    font-size: 12px;
    color: #ddd;
    max-height: 3.2em;
    overflow: hidden;
}

/* Нижняя строка: gender + online/offline */
.bongacams-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin-top: 2px;
}

.bongacams-gender {
    background: #444;
    color: #fff;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 11px;
}

/* Статусы */
.bongacams-status {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.bongacams-online {
    background: #2e7d32; /* зелёный */
    color: #fff;
}

.bongacams-offline {
    background: #555;
    color: #eee;
}

/* Пустое состояние */
.bongacams_empty {
    padding: 20px;
    text-align: center;
    color: #aaa;
    font-style: italic;
}

/* ==========================================================================
   Пагинация
   ========================================================================== */

.bongacams_pager {
    margin-top: 16px;
    font-size: 13px;
    color: #ddd;
}

.bongacams_pager_item {
    display: inline-block;
    margin: 0 3px;
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid #444;
    text-decoration: none;
    color: #ddd;
    background: #111;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bongacams_pager_item:hover {
    background: #e91e63;
    border-color: #e91e63;
    color: #fff;
}

.bongacams_pager_item.current,
.bongacams_pager_item.current:hover {
    background: #e91e63;
    border-color: #e91e63;
    color: #fff;
    cursor: default;
}

/* ==========================================================================
   Таймер автообновления
   ========================================================================== */

.bongacams-refresh-timer {
    margin-top: 10px;
    font-size: 12px;
    color: #ccc;
    font-style: italic;
}

/* Можно подсветить, если скоро обновление */
.bongacams-refresh-timer.warning {
    color: #ffeb3b;
}

/* ==========================================================================
   Виджет в сайдбаре
   ========================================================================== */

.bongacams-widget-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bongacams-widget-card {
    background: #111;
    border-radius: 4px;
    border: 1px solid #333;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.bongacams-widget-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    border-color: #e91e63;
}

.bongacams-widget-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.bongacams-widget-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-top: 2px;
}

.bongacams-widget-display {
    font-size: 11px;
    color: #bbb;
}

/* ==========================================================================
   Модальное окно (оверлей)
   ========================================================================== */

.bongacamsshadow {
    position: fixed;
    z-index: 9998;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: none;
}

.bongacamspopup {
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    border-radius: 6px;
    border: 1px solid #444;
    max-width: 1024px;
    width: 90%;
    max-height: 90%;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    overflow: hidden;
}

.bongacams-modal-open {
    overflow: hidden;
}

/* Шапка модалки */
.bongacams-close {
    text-align: right;
    padding: 6px 8px 0;
}

.bongacams-close-btn {
    color: #aaa;
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
}

.bongacams-close-btn:hover {
    color: #fff;
}

.bongacams-modal-content {
    display: flex;
    flex-direction: column;
    padding: 0 10px 10px;
}

/* Заголовок */
.bongacams-modal-header {
    margin-bottom: 6px;
}

.bongacams-modal-title {
    margin: 0;
    padding: 0 2px;
    font-size: 18px;
    color: #fff;
}

/* Тело модалки */
.bongacams-modal-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Блок плеера */
.bongacams-modal-player-wrap {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    background: #000;
}

/* соотношение 16:9 — подгони под себя */
.bongacams-modal-player-wrap::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 */
}

.bongacams-modal-iframe {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Текст под плеером */
.bongacams-modal-text {
    font-size: 13px;
    color: #ddd;
}

/* Верх/низ текстовые блоки, которые ты задаёшь в настройках */
.bongacams-modal-text-above {
    margin-bottom: 6px;
}

.bongacams-modal-text-below {
    margin-top: 6px;
}

.bongacams-modal-model-info p {
    margin: 2px 0;
}

/* Адаптив модалки */
@media (max-width: 768px) {
    .bongacamspopup {
        width: 96%;
        max-width: 96%;
    }

    .bongacams-modal-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .bongacams-modal-title {
        font-size: 14px;
    }
}

/* ==========================================================================
   Прочее
   ========================================================================== */

.bongacams-modal-text a {
    color: #ff4081;
}

.bongacams-modal-text a:hover {
    color: #ff80ab;
}

/* пример: если хочешь скрыть скролл у body при модалке – класс уже добавляется */
body.bongacams-modal-open {
    overflow: hidden;
}