/* Доп. стили поверх Tailwind */

.leaflet-container {
    z-index: 1;
}

.event-marker {
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    border-radius: 9999px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    font-weight: 700;
}

/* Звёзды рейтинга. В DOM элементы идут 5→1, благодаря row-reverse визуально 1→5.
   Это позволяет с помощью селектора .star:hover ~ .star подсветить
   "звёзды слева от курсора" корректно. */
.rating-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; cursor: pointer; }
.rating-stars .star {
    width: 22px; height: 22px; color: #cbd5e1; transition: color .15s;
}
.rating-stars .star.active { color: #f59e0b; }

.rating-stars[data-readonly="false"] .star:hover,
.rating-stars[data-readonly="false"] .star:hover ~ .star { color: #f59e0b; }

.rating-stars[data-readonly="true"] .star { cursor: default; }

/* Текстовое поле формы */
.form-input,
input[type="text"].crispy,
input[type="email"].crispy,
input[type="password"].crispy,
input[type="number"].crispy,
input[type="date"].crispy,
input[type="datetime-local"].crispy,
input[type="url"].crispy,
textarea.crispy,
select.crispy {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .crispy:focus {
    border-color: #3a82f6;
    box-shadow: 0 0 0 3px rgba(58,130,246,0.15);
}

.heart-btn.is-active svg { fill: #ef4444; color: #ef4444; }

/* Комментарии */
.comment-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
    position: relative;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color .15s, box-shadow .15s;
}
.comment-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0.85rem; bottom: 0.85rem;
    width: 3px;
    background: linear-gradient(180deg, #c7d2fe, #93c5fd);
    border-top-left-radius: 0.85rem;
    border-bottom-left-radius: 0.85rem;
    opacity: 0;
    transition: opacity .15s;
}
.comment-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05); }
.comment-card:hover::before { opacity: 1; }
.comment-card.is-organizer::before { opacity: 1; background: linear-gradient(180deg, #2563eb, #1d4ed8); }
.comment-card.is-organizer { background: #f8fafc; }

.comment-card .reply.reply-card {
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem 0.6rem 0.9rem;
    border-left: 2px solid #e2e8f0;
    border-radius: 0 0.6rem 0.6rem 0;
    background: #f8fafc;
    box-shadow: none;
}
.comment-card .reply.reply-card::before { display: none; }
.replies-container { padding-left: 1.25rem; border-left: 2px dashed #e2e8f0; margin-left: 0.5rem; }

.comment-card.is-deleted .comment-body { opacity: 0.7; }
.comment-card.is-deleted::before { display: none; }

.comment-actions .comment-menu-btn { line-height: 1; font-size: 1.25rem; }

/* Кнопка лайка комментария */
.cmt-like {
    line-height: 1;
    border: 1px solid transparent;
}
.cmt-like.is-liked {
    background: #fff1f2;
    border-color: #fecdd3;
}
.comment-edit-form textarea { width: 100%; min-height: 70px; padding: 0.5rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 0.5rem; font-size: 0.875rem; outline: none; resize: vertical; }
.comment-edit-form textarea:focus { border-color: #3a82f6; box-shadow: 0 0 0 3px rgba(58,130,246,0.15); }
.comment-edit-form .actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; justify-content: flex-end; }
.comment-edit-form .actions button { padding: 0.35rem 0.75rem; border-radius: 0.5rem; font-size: 0.8125rem; }
.comment-edit-form .actions .save-btn { background: #2563eb; color: #fff; }
.comment-edit-form .actions .save-btn:hover { background: #1d4ed8; }
.comment-edit-form .actions .cancel-btn { background: #f1f5f9; color: #334155; }
.comment-edit-form .actions .cancel-btn:hover { background: #e2e8f0; }

/* Мобильная адаптивность ------------------------------------------------ */

/* Запрет прокрутки body, когда открыто off-canvas меню */
html.overflow-hidden, body.overflow-hidden { overflow: hidden; }

/* Минимальная высота интерактивных зон в мобильной навигации */
@media (max-width: 767px) {
    #nav-mobile-panel a,
    #nav-mobile-panel button {
        min-height: 44px;
    }
    .container { padding-left: 1rem; padding-right: 1rem; }
    .rating-stars .star { width: 26px; height: 26px; }
}

/* Длинные слова и URL не должны разрывать сетку */
.comment-card .comment-body,
.prose { overflow-wrap: anywhere; word-break: break-word; }

/* На мобильном картинка-обложка события чуть ниже */
@media (max-width: 480px) {
    .leaflet-container { min-height: 220px; }
}
