/* ═══════════════════════════════════════════════════════════════════════════
   📅 Schedule Cards — календарь событий, бейджи, ссылки, Google Calendar
   [ВЫДЕЛЕНО В: task-2026-06-27-admin-cms-audit (Фаза 5) — из community-cards.css]
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Calendar grouping ───────────────────────────────────────────── */
.cal-month {
    width: 100%;
    margin-bottom: 1.25rem;
}
.cal-month__title {
    font-weight: 700;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--green-primary);
    opacity: 0.8;
}
.cal-events {
    display: grid;
    grid-auto-rows: 1fr;  /* одинаковая высота всех карточек */
    gap: 0.5rem;
    width: 100%;
}
.cal-event {
    display: grid;
    grid-template-columns: 90px 1fr auto;  /* date | body | action */
    gap: 0;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--cal-color, var(--green-primary));
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    min-height: 80px;
}
.cal-event:hover {
    transform: var(--effect-hover-lift);
    box-shadow: var(--effect-glow-green);
}
.cal-event__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-right: 1rem;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.cal-event__day {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--green-primary);
}
.cal-event__dow {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.55;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 3px;
}
.cal-event__time {
    font-size: 0.6rem;
    font-weight: 500;
    opacity: 0.5;
    color: var(--md-default-fg-color--light, #666);
    margin-top: 2px;
    text-align: center;
    letter-spacing: 0.03em;
}
.cal-event__body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    padding: 0 1rem;
    border-right: 1px solid var(--ps-glass-border);
}
.cal-event__title {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--md-default-fg-color, #333);
}
.cal-event__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.2rem;
}
.cal-event__desc {
    font-size: 0.8rem;
    opacity: 0.65;
    line-height: 1.45;
    margin-top: 0.25rem;
    color: var(--md-default-fg-color--light, #555);
}
.cal-event__action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.4rem;
    flex-shrink: 0;
    padding-left: 0.75rem;
    min-width: 110px;
}

.cal-event__img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* ── Badges ──────────────────────────────────────────────────────── */
.cal-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.cal-badge--free     { background: rgba(var(--green-primary-rgb), 0.15); color: var(--green-primary); }
.cal-badge--paid     { background: rgba(245, 124, 0, 0.15); color: #f57c00; }
.cal-badge--online   { background: rgba(0, 123, 255, 0.12); color: #007bff; }
.cal-badge--offline  { background: rgba(118, 75, 162, 0.15); color: #764ba2; }
.cal-badge--info     { background: rgba(128, 128, 128, 0.12); color: #666; }
.cal-badge--warning  { background: rgba(245, 124, 0, 0.12); color: #f57c00; }
.cal-badge--error    { background: rgba(220, 53, 69, 0.12); color: #dc3545; }
.cal-badge--past     { background: rgba(128, 128, 128, 0.08); color: #999; }

/* ── Links (pill-стиль) ─────────────────────────────────────────── */
.cal-link {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff !important;
    background: var(--green-primary);
    text-decoration: none !important;
    white-space: nowrap;
    text-align: center;
    transition: opacity 0.2s, transform 0.15s;
}
/* Выравнивание line-height с Quasar .q-btn при использовании text-xs (Tailwind) */
.cal-link.text-xs {
    line-height: 1.2;
}
.cal-link:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
.cal-link--ghost {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--green-primary) !important;
    background: transparent;
    border: 1px solid var(--green-primary);
    text-decoration: none !important;
    white-space: nowrap;
    text-align: center;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}
.cal-link--ghost:hover {
    background: rgba(var(--green-primary-rgb), 0.08);
    color: var(--green-dark) !important;
    transform: translateY(-1px);
}

/* ── Boosty gold link (task-2026-06-23-005) ──────────────────────── */
.cal-link--boosty {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #b8860b !important;
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    border: 1px solid #e6a800;
    text-decoration: none !important;
    white-space: nowrap;
    text-align: center;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.cal-link--boosty:hover {
    background: linear-gradient(135deg, #ffed4a 0%, #ffc107 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.25);
}
body.body--dark .cal-link--boosty {
    color: #ffd700 !important;
    background: linear-gradient(135deg, #8b6914 0%, #6b4f10 100%);
    border-color: #8b6914;
}
body.body--dark .cal-link--boosty:hover {
    background: linear-gradient(135deg, #a67c00 0%, #8b6914 100%);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.15);
}

/* Quasar-совместимость: .cal-link--boosty на .q-btn (task-2026-06-23-007) */
.q-btn.cal-link--boosty {
    display: inline-flex;
    border-radius: 6px;
    text-transform: none;
    padding: 6px 14px;
    min-height: unset;
    line-height: 1.2;
    /* Перебить Quasar var(--q-primary)!important (синий фон) */
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%) !important;
    color: #b8860b !important;
}
/* Убрать внутренние отступы Quasar .q-btn__content для выравнивания с .cal-link */
.q-btn.cal-link--boosty .q-btn__content {
    padding: 0;
    min-height: unset;
}
.q-btn.cal-link--boosty:hover {
    background: linear-gradient(135deg, #ffed4a 0%, #ffc107 100%) !important;
}

/* Dark mode: .cal-link--boosty на .q-btn */
body.body--dark .q-btn.cal-link--boosty {
    color: #ffd700 !important;
    background: linear-gradient(135deg, #8b6914 0%, #6b4f10 100%) !important;
}
body.body--dark .q-btn.cal-link--boosty:hover {
    background: linear-gradient(135deg, #a67c00 0%, #8b6914 100%) !important;
}

/* Quasar-совместимость: .cal-link--ghost на .q-btn (task-2026-06-23-007) */
.q-btn.cal-link--ghost {
    display: inline-flex;
    border-radius: 6px;
    text-transform: none;
    padding: 6px 14px;
    min-height: unset;
    line-height: 1.2;
    background: transparent !important;
    color: var(--green-primary) !important;
    border: 1px solid var(--green-primary);
    font-weight: 500;
}
.q-btn.cal-link--ghost .q-btn__content {
    padding: 0;
    min-height: unset;
}
.q-btn.cal-link--ghost:hover {
    background: rgba(var(--green-primary-rgb), 0.08) !important;
}

/* Quasar-совместимость: .cal-link на .q-btn (task-2026-06-23-007) */
.q-btn.cal-link {
    display: inline-flex;
    border-radius: 6px;
    text-transform: none;
    padding: 6px 14px;
    min-height: unset;
    line-height: 1.2;
    /* Перебить Quasar var(--q-primary)!important */
    background: var(--green-primary) !important;
    color: #fff !important;
    font-weight: 600;
}
.q-btn.cal-link .q-btn__content {
    padding: 0;
    min-height: unset;
}
.q-btn.cal-link:hover {
    opacity: 0.85;
}

/* ── Google Calendar iframe ──────────────────────────────────────── */
.cal-gcal {
    width: 100%;
    max-width: 100%;
    margin-top: 1.5rem;
}
.cal-gcal__iframe {
    width: 100%;
    height: 500px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--ps-shadow-subtle);
}

/* Dark mode: invert Google Calendar (не поддерживает нативную тёмную тему) */
body.body--dark .cal-gcal__iframe {
    filter: invert(1) hue-rotate(180deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive: уменьшаем высоту на мобильных */
@media (max-width: 768px) {
    .cal-gcal__iframe {
        height: 400px;
        border-radius: 8px;
    }
}

/* ── Google Calendar hint (mobile/desktop) ──────────────────────── */
.cal-gcal__hint-mobile {
    display: none;   /* hidden on desktop (>768px) */
}
.cal-gcal__hint-desktop {
    display: block;  /* shown on desktop (>768px) */
}

@media (max-width: 768px) {
    .cal-gcal__hint-mobile {
        display: block;  /* shown on mobile (≤768px) */
    }
    .cal-gcal__hint-desktop {
        display: none;   /* hidden on mobile (≤768px) */
    }
}

/* ── Responsive: vote cards и calendar ───────────────────────────── */
@media (max-width: 768px) {
    .vote-card {
        flex-direction: column;
        align-items: stretch;
    }
    .vote-card__img {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    .vote-card__actions {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }
    .vote-card { gap: 0.625rem; padding: 0.625rem 0.875rem; }
    /* Календарь: дата слева, контент справа, кнопки снизу */
    .cal-event {
        grid-template-columns: 80px 1fr;
        padding: 0.625rem;
    }
    .cal-event__date {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        padding-right: 0.5rem;
        border-right: none;
    }
    .cal-event__day {
        font-size: 1.3rem;
    }
    .cal-event__body {
        padding: 0 0 0 0.5rem;
        border-right: none;
    }
    .cal-event__action {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        padding-left: 0;
        min-width: auto;
        margin-top: 0.5rem;
        grid-column: 2;
    }
    .cal-month { margin-bottom: 0.875rem; }
    .cal-month__title { margin-bottom: 0.5rem; padding-bottom: 0.375rem; }
    .vote-leaderboard { margin-bottom: 1rem; }
    .ps-paths-grid { gap: 1rem; }
    .ps-path-card { padding: 1.25rem !important; box-sizing: border-box !important; }
    .ps-faq-item .q-item { padding: 0.625rem 0.5rem; }
    .review-avatar { display: none; }
}

@media (max-width: 480px) {
    .cal-month { margin-bottom: 0.75rem; }
    .cal-month__title { margin-bottom: 0.375rem; }
    .cal-event { padding: 0.5rem; }
    .vote-card { gap: 0.5rem; }
    .vote-leaderboard { margin-bottom: 0.75rem; }
    .ps-paths-grid { gap: 0.75rem; }
    .ps-path-card { padding: 1rem !important; box-sizing: border-box !important; }
    .review-avatar { display: none; }
    .upcoming-events-grid { gap: 0.75rem; }
}
