/* ============================================================
   VK Post Publisher — Стили
   ============================================================ */

/* ---------- Сброс и базовые ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #222;
}

h1 { font-size: 24px; margin-bottom: 8px; color: #222; }


/* ---------- Главная страница (home) ---------- */
body.home {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.home .card {
    max-width: 480px;
    width: 100%;
    text-align: center;
    padding: 48px;
}

.logo {
    font-size: 48px;
    margin-bottom: 8px;
}

.sub {
    color: #656565;
    margin-bottom: 32px;
    line-height: 1.5;
}

.err {
    background: #ffe0e0;
    color: #c00;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: left;
    font-size: 14px;
    line-height: 1.4;
}

.btn-vk {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0077FF;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s;
}
.btn-vk:hover { background: #005fcc; }
.btn-vk svg   { width: 24px; height: 24px; fill: currentColor; }

.feat {
    margin-top: 32px;
    text-align: left;
    font-size: 14px;
    color: #555;
    line-height: 2;
}
.feat li::marker { color: #0077FF; }


/* ---------- Шапка (publish) ---------- */
.hdr {
    background: #fff;
    padding: 16px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hdr h1 { font-size: 20px; }
.hdr a  { color: #0077FF; text-decoration: none; font-size: 14px; }
.hdr .uid { font-size: 14px; color: #656565; }


/* ---------- Карточки и контейнер ---------- */
.ctr {
    max-width: 800px;
    margin: 24px auto;
    padding: 0 16px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    margin-bottom: 20px;
}
.card h2 {
    font-size: 18px;
    margin-bottom: 16px;
}


/* ---------- Текстовое поле ---------- */
textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #d3d9de;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    line-height: 1.5;
}
textarea:focus {
    outline: none;
    border-color: #0077FF;
}

.cnt {
    color: #656565;
    font-size: 13px;
    margin-top: 4px;
}


/* ---------- Список групп ---------- */
.gl {
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid #e7e8ec;
    border-radius: 8px;
}

.gi {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: background .15s;
}
.gi:hover { background: #f7f8fa; }
.gi:last-child { border-bottom: none; }

.gi img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e7e8ec;
}
.gi label {
    flex: 1;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.3;
}
.gi input[type=checkbox] {
    width: 20px;
    height: 20px;
    accent-color: #0077FF;
    cursor: pointer;
    flex-shrink: 0;
}

.gn { font-weight: 600; }
.gs { color: #656565; font-size: 12px; }


/* ---------- «Выбрать все» ---------- */
.sa {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
    color: #0077FF;
}
.sa input {
    accent-color: #0077FF;
    cursor: pointer;
}


/* ---------- Кнопка «Опубликовать» ---------- */
.btn-pub {
    background: #0077FF;
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    display: block;
    width: 100%;
}
.btn-pub:hover    { background: #005fcc; }
.btn-pub:disabled { background: #99c2ff; cursor: not-allowed; }


/* ---------- Алерты ---------- */
.al {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.al-e { background: #ffe0e0; color: #c00; }
.al-s { background: #e0f5e0; color: #060; }


/* ---------- Результаты публикации ---------- */
.ri {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
}
.ri:last-child { border-bottom: none; }

.ro      { color: #060; }
.ro a    { color: #0077FF; }
.rf      { color: #c00; }


/* ---------- Бейджи и утилиты ---------- */
.bdg {
    display: inline-block;
    background: #e7e8ec;
    color: #555;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 4px;
}

.ng {
    text-align: center;
    padding: 32px;
    color: #999;
}