/* ge-whoareyou.css
 *
 * Назначение: брендинг страницы ожидания гостя /whoAreYou/<ROOM_ID>.
 * Как работает:
 * - Фон + шапка берутся из /public/images.
 * - Макет на десктопе: заголовок на всю ширину, ниже 2 колонки (карточка + фото).
 * - На мобильных: заголовок → фото → карточка → кнопка (сверху вниз).
 * - Кнопка "Подключиться" получает disabled-состояние через класс .disabled (ставит WhoAreYou.js).
 */

/* ==========================================================================
 * 1. Переменные темы (РУЧКИ ДЛЯ РУЧНОЙ НАСТРОЙКИ)
 * ========================================================================== */
:root {
    /* фон и шапка */
    --ge-who-bg: url('../images/ge_enter_bg_desktop.png');
    --ge-who-header: url('../images/ge_login_header.png');

    /* акцент (кнопки/ссылки) */
    --ge-accent: #D86A2C;
    --ge-accent-hover: #C85F25;

    /* === РУЧКИ: цвета === */
    --ge-title-color: rgb(224, 90, 0);     /* заголовок */
    --ge-body-color: rgba(121, 54, 0, 0.95);      /* основной текст */
    --ge-schedule-color: rgba(80, 47, 14, 0.95); /* строка "Начало согласно..." */

    /* === РУЧКИ: размеры шрифтов === */
    --ge-title-size: 36px;     /* заголовок */
    --ge-body-size: 18px;      /* основной текст */
    --ge-schedule-size: 18px;  /* строка "Начало согласно..." */

    /* подложка/карточка */
    --ge-card: rgba(255, 255, 255, 0.288);
    --ge-card-border: rgba(255, 255, 255, 0.418);

    /* === РУЧКА: приподнять/опустить весь контент относительно шапки === */
    --ge-hero-pad-top: 6px;

    /* сетка (десктоп) */
    --ge-photo-col: 360px; /* ширина колонки фото */
    --ge-col-gap: 20px;    /* расстояние между карточкой и фото (уменьшили) */
    --ge-row-gap: 30px;    /* расстояние между заголовком и блоками */
}

/* ==========================================================================
 * 2. Фон страницы
 * ========================================================================== */
body.is-boxed {
    background: #0f1115 var(--ge-who-bg) center center / cover no-repeat fixed;
}

/* На мобильных fixed иногда дергается — отключаем */
@media (max-width: 768px) {
    body.is-boxed {
        background-attachment: scroll;
    }
}

/* ==========================================================================
 * 3. Убираем стандартные подложки/диагонали landing.css
 * ========================================================================== */
.body-wrap,
.hero {
    background: transparent !important;
}

.hero::before,
.hero::after,
.body-wrap::before,
.body-wrap::after,
.site-footer::before,
.site-footer::after,
body.is-boxed::before,
body.is-boxed::after,
.site-header::before,
.site-header::after,
main::before,
main::after,
.hero-inner::before,
.hero-inner::after,
.container::before,
.container::after {
    content: none !important;
    display: none !important;
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.site-header,
main,
.hero,
.site-footer,
.hero-inner,
.container {
    background: transparent !important;
}

/* ==========================================================================
 * 4. Шапка-картинка
 * ========================================================================== */
.site-header-inner {
    justify-content: center;
}

.brand.header-brand {
    display: block;
    width: min(920px, 92vw);
    aspect-ratio: 1831 / 301;
    margin: 10px auto 0;
    background-image: var(--ge-who-header);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.35));
}

/* ==========================================================================
 * 5. Основной макет (GRID без правок HTML)
 * Важно: заголовок внутри .ge-who-left, но мы делаем .ge-who-left {display: contents}
 * и раскладываем элементы сеткой.
 * ========================================================================== */
.hero {
    padding-top: var(--ge-hero-pad-top);
}

/* вместо flex — сетка:
   ROW1: title (на 2 колонки)
   ROW2: card (слева) + photo (справа)
*/
.ge-who-inner {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) var(--ge-photo-col);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "title title"
        "card  photo";
    column-gap: var(--ge-col-gap);
    row-gap: var(--ge-row-gap);
    align-items: start;
}

/* "распаковываем" левый контейнер, чтобы title+card стали прямыми grid-элементами */
.ge-who-left {
    display: contents;
}

/* ==========================================================================
 * 6. Заголовок + карточка текста
 * ========================================================================== */
.ge-who-title {
    grid-area: title;
    margin: 0 0 2px 0;
    color: var(--ge-title-color);
    font-size: var(--ge-title-size);
    font-weight: 800;
    line-height: 1.15;
    text-shadow:
        1px 1px 0 rgba(255, 255, 255, 0.849),
        0 10px 30px rgba(255, 158, 93, 0.932);
    text-align: center; /* центрируем на всю ширину (текст+фото) */
}

.ge-who-card {
    grid-area: card;
    background: var(--ge-card);
    border: 1px solid var(--ge-card-border);
    border-radius: 18px;
    padding: 18px 18px 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-self: start;
}

.ge-who-text {
    color: var(--ge-body-color);
    font-size: var(--ge-body-size);
    line-height: 1.55;
}

.ge-who-text strong {
    font-weight: 800;
}

/* GE: типографика текста приветствия */
.ge-who-text p {
    margin: 0 0 10px 0;  /* расстояние между абзацами */
}

.ge-who-text p:last-child {
    margin-bottom: 0;
}

.ge-who-text {
    line-height: 1.6;   /* чуть разрядить строки */
}


.ge-who-schedule {
    margin-top: 16px;
    color: var(--ge-schedule-color);
    font-size: var(--ge-schedule-size);
    font-weight: 700;
}

.ge-who-schedule a {
    color: var(--ge-accent);
    text-decoration: underline;
}

/* ==========================================================================
 * 7. Кнопка "Подключиться" — по центру
 * ========================================================================== */
.hero-cta {
    display: flex;
    justify-content: center; /* центрируем кнопку */
}

#guestJoinRoomButton.button.button-primary {
    margin-top: 16px;
    width: 280px;
    max-width: 100%;
    background: var(--ge-accent) !important;
    background-image: none !important;
    border: none !important;
    color: #ffffff !important;
}

#guestJoinRoomButton.button.button-primary:hover {
    background: var(--ge-accent-hover) !important;
}

#guestJoinRoomButton.button.button-primary:active,
#guestJoinRoomButton.button.button-primary:focus {
    background: var(--ge-accent-hover) !important;
    box-shadow: 0 0 0 0.2rem rgba(216, 106, 44, 0.28) !important;
}

/* disabled-состояние (класс ставит WhoAreYou.js) */
#guestJoinRoomButton.disabled {
    opacity: 0.55;
    filter: grayscale(0.25);
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ==========================================================================
 * 8. Фото лектора — вровень с карточкой + подгон по высоте карточки
 * ========================================================================== */
.ge-who-right {
    grid-area: photo;
    align-self: stretch;      /* тянемся по высоте строки (равно карточке) */
    display: flex;
    justify-content: flex-end;
}

.ge-photo-frame {
    width: 380px;
    max-width: 92vw;

    /* ключевое: высота под строку grid (то есть под карточку) */
    height: 100%;

    background: rgba(200, 200, 200, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    display: flex; /* чтобы img занял всю высоту */
}

#geLecturerPhoto {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover; /* обрезаем по краям, чтобы заполнить высоту */
}

/* ==========================================================================
 * 9. Футер (как на /login) + скрыть соц-иконки
 * ========================================================================== */
#footer .footer-social-links,
#footer .github-button {
    display: none !important;
}

#footer .ge-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}

#footer .ge-footer-left {
    color: rgba(0, 0, 0, 0.78);
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

#footer .ge-online {
    color: #1e8305;
    font-weight: 700;
}

#footer .ge-footer-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#footer .ge-footer-link {
    color: rgba(0, 0, 0, 0.78);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

#footer .ge-footer-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
 * 10. Мобильная компоновка (сверху вниз: заголовок → фото → карточка)
 * ========================================================================== */
@media (max-width: 900px) {
    .ge-who-inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "title"
            "photo"
            "card";
        column-gap: 0;
        row-gap: 14px;
    }

    .ge-who-right {
        justify-content: center;
        align-self: auto;
    }

    .ge-photo-frame {
        width: min(420px, 92vw);
        height: auto;
        display: block;
    }

    #geLecturerPhoto {
        height: auto;
        object-fit: cover;
    }

    #footer .ge-footer {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }

    #footer .ge-footer-left {
        white-space: normal;
    }

    #footer .ge-footer-right {
        justify-content: center;
    }
}
