/* base-common.css — вынесено из инлайн <style> в templates/base.html,
   грузится на каждой странице сайта. Не путать с bootstrap.purged.css/bundle.css. */

/* Убираем подчёркивание у всех тегов (badge) */
.badge, .story-tag, a.badge, a.story-tag,
.badge:hover, .story-tag:hover, a.badge:hover, a.story-tag:hover,
.badge:focus, .story-tag:focus, a.badge:focus, a.story-tag:focus {
    text-decoration: none !important;
}

/* ИСПРАВЛЕНИЕ: story-description → 6 строк */
div.story-description,
div.story-description.collapsed,
.story-description.mb-4,
div.story-description.mb-4.collapsed {
    display: -webkit-box !important;
    -webkit-line-clamp: 6 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.6 !important;
    max-height: none !important;
}

/* Принудительное скрытие бургера на десктопе */
@media (min-width: 992px) {
    .mobile-burger-menu {
        display: none !important;
    }
}

/* Показываем только на мобильных */
@media (max-width: 991.98px) {
    .mobile-burger-menu {
        display: flex !important;
    }
}

/* Исправление ширины пользовательского dropdown меню */
.navbar-nav .dropdown-menu {
    min-width: 250px !important;
}

.navbar-nav .dropdown-item {
    white-space: nowrap !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
}

.navbar-nav .dropdown-item i {
    width: 16px !important;
    text-align: center !important;
    margin-right: 8px !important;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .navbar-nav .dropdown-menu {
        min-width: 280px !important;
        max-width: 90vw !important;
    }
}

/* Стили для рейтинга звёзд */
.rating-input {
    display: flex;
    flex-direction: row; /* Обычный порядок */
    justify-content: flex-start;
}

.rating-input input {
    display: none;
}

.rating-input .star-label {
    color: #ddd !important;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    margin-right: 5px;
}

/* Подсветка при наведении и выборе */
.rating-input .star-label:hover,
.rating-input .star-label.active {
    color: #ffc107 !important;
}

/* Отступы для иконок в кнопках */
.btn i {
    margin-right: 6px !important;
}

.btn-purchase {
    background: linear-gradient(135deg, #28a745, #20692b) !important;
    border: none !important;
    color: white !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    white-space: nowrap;
}

.btn-purchase:hover {
    background: linear-gradient(135deg, #20692b, #28a745) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    color: white !important;
    text-decoration: none;
}

/* ИСПРАВЛЕНИЕ: Раскрытие текста на мобильных */
.story-description.expanded,
.text-content.expanded,
.expandable-text.expanded {
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
}

.story-description.expanded::after,
.text-content.expanded::after,
.expandable-text.expanded::after {
    display: none !important;
}

.story-detail,
.story-card,
.fairy-tale-detail,
.book-detail {
    overflow: visible !important;
}

@media (max-width: 768px) {
    .story-description.collapsed,
    .text-content.collapsed {
        max-height: 120px;
        overflow: hidden;
    }

    .story-description.expanded,
    .text-content.expanded,
    .expandable-text.expanded {
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
    }

    .story-detail,
    .content-wrapper,
    .main-content {
        overflow: visible !important;
        max-height: none !important;
    }
}

@media (max-width: 576px) {
    .story-description.collapsed {
        max-height: 100px;
    }

    .story-description.expanded,
    .text-content.expanded {
        max-height: none !important;
        overflow: visible !important;
    }
}
