/* Сетка */

.scm-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

/* Карточка */

.wp-scm-card {
    display: flex;
    flex-direction: column;
    background: #111;
    border-radius: 6px;
    overflow: hidden;
    color: #fff;
    border: 1px solid #222;
}

/* Превью */

.wp-scm-thumb-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: #000;
}

.wp-scm-thumb,
.wp-scm-thumb-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-scm-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 8px;
    text-align: center;
    background: #222;
}

/* Бейджи */

.wp-scm-badge-online {
    position: absolute;
    left: 8px;
    top: 8px;
    background: #e91e63;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

.wp-scm-badge-viewers {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Инфа */

.wp-scm-info {
    padding: 8px 10px 10px;
}

.wp-scm-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.wp-scm-username {
    font-size: 12px;
    color: #aaa;
}

/* Модалка */

.wp-scm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    color: #f9fafb;
}

.wp-scm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.wp-scm-modal-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 960px;
    max-width: 95vw;
    height: 540px;
    max-height: 95vh;

    background: #111;
    border-radius: 8px;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

.wp-scm-modal-header {
    padding: 8px 12px;
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Тело модалки: левая часть (плеер) + правая (чат) */

.wp-scm-modal-body {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* Левая часть */

.wp-scm-modal-left {
    flex: 3;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 8px;
}

/* Верхняя панель над плеером */

.wp-scm-player-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
    color: #fff;
}

.wp-scm-player-title {
    font-weight: 600;
}

.wp-scm-player-actions {
    display: flex;
    gap: 6px;
}

/* Плеер */

.wp-scm-player-wrapper {
    flex: 1;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.wp-scm-player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Блоки под плеером */

.wp-scm-player-bottom {
    margin-top: 8px;
    font-size: 13px;
    color: #ddd;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wp-scm-player-info {
    font-size: 12px;
    color: #bbb;
}

.wp-scm-player-bio {
    max-height: 80px;
    overflow: auto;
    font-size: 12px;
}

.wp-scm-player-extra a {
    color: #e91e63;
    text-decoration: none;
    font-size: 12px;
}

/* Правая колонка — чат (светлая) */

.wp-scm-modal-right {
    flex: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;

    background: #f3f4f6;      /* нейтральный светлый фон */
    padding: 8px 10px;
    border-left: 1px solid #d1d5db;
}

/* Обёртка чата */

.wp-scm-chat-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    color: #111827;
    font-size: 13px;
}

/* Вкладки Global / Private */

.wp-scm-chat-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.wp-scm-chat-tab {
    flex: 1;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    font-size: 13px;
    border-radius: 4px 4px 0 0;
    background: #e5e7eb;
    color: #111827;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

/* Активные вкладки */

.wp-scm-chat-tab[data-room="global"].active {
    background: #2563eb;      /* синий */
    color: #f9fafb;
}

.wp-scm-chat-tab[data-room="private"].active {
    background: #10b981;      /* зелёный */
    color: #f9fafb;
}

/* Контейнер комнат */

.wp-scm-chat-room {
    display: flex;
    flex-direction: column;
    height: calc(100% - 32px); /* минус вкладки */
}

/* Список сообщений */

.wp-scm-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    font-size: 12px;
    color: #111827;
    margin-bottom: 6px;
}

/* Одна строка сообщения */

.wp-scm-chat-row {
    margin-bottom: 4px;
    line-height: 1.3;
}

.wp-scm-chat-time {
    font-size: 11px;
    color: #6b7280;
    margin-right: 4px;
}

.wp-scm-chat-user {
    font-weight: 600;
    margin-right: 4px;
    color: #111827;
}

.wp-scm-chat-text {
    color: #111827;
}

/* Форма ввода */

.wp-scm-chat-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wp-scm-chat-form input,
.wp-scm-chat-form textarea {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #cbd5f5;
    background: #ffffff;
    color: #111827;
    padding: 4px 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.wp-scm-chat-form textarea {
    resize: vertical;
    min-height: 40px;
}

/* Кнопка отправки */

.wp-scm-chat-send {
    align-self: flex-end;
    padding: 6px 10px;
    background: #16a34a;
    border: none;
    border-radius: 4px;
    color: #f9fafb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.wp-scm-chat-send:hover {
    background: #15803d;
}

/* Кнопка закрытия модалки */

.wp-scm-modal-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

/* Пагинация сетки */

.wp-scm-pagination {
    margin-top: 12px;
    text-align: center;
}

.wp-scm-page {
    display: inline-block;
    padding: 4px 8px;
    margin: 0 2px;
    border-radius: 3px;
    background: #222;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
}

.wp-scm-page.current {
    background: #e91e63;
}

/* Страница профиля */

.scm-profile-page {
    color: #fff;
}

.scm-profile-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.scm-profile-thumb img {
    max-width: 160px;
    border-radius: 8px;
}

.scm-thumb-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    background: #222;
    border-radius: 8px;
}

.scm-profile-main h1 {
    margin-top: 0;
}

.scm-profile-player video {
    width: 100%;
    max-width: 640px;
    background: #000;
}