/* === Deferred CSS: below-fold components === */

/* Messages container & cards */
.messages_wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 15px;
    background: transparent;
}
.message_grid {
    position: relative;
    width: 100%;
    background: transparent;
}
.messages__one.message_parsed {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    padding: 14px 16px;
    position: relative;
    border: 1px solid #e0e4e8;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.messages__one.message_parsed:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #c8cdd2;
}
.message_grid:nth-child(even) .messages__one.message_parsed {
    background: #e8f4fd;
    border-color: #b8d8f8;
}
.message_grid:nth-child(even) .messages__one.message_parsed:hover {
    border-color: #90c4f0;
}
.date_in_messages {
    display: inline-block;
    font-size: 12px;
    color: #8a9aab;
    margin-bottom: 8px;
    padding: 2px 8px;
    background: rgba(0,0,0,0.04);
    border-radius: 10px;
}
.message-text-wrapper {
    position: relative;
}
.message-text-content {
    max-height: 180px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.message-text-wrapper.expanded .message-text-content {
    max-height: none;
}
.message-expand-btn {
    display: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%);
    padding: 30px 0 10px;
    margin-top: -30px;
    position: relative;
    text-align: center;
    width: 100%;
    border: none;
    color: #0099de;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}
.message-text-wrapper.truncated .message-expand-btn {
    display: block;
}
.message-text-wrapper.expanded .message-expand-btn {
    background: none;
    margin-top: 10px;
    padding: 0;
}
.messages__one.message_parsed.message--hot,
.message_grid:nth-child(even) .messages__one.message_parsed.message--hot {
    background: linear-gradient(135deg, #fff8f5 0%, #ffffff 100%);
    border-color: #ffcbb8;
    border-left: 3px solid #ff6b35;
}
.messages__one.message_parsed.message--trending,
.message_grid:nth-child(even) .messages__one.message_parsed.message--trending {
    background: linear-gradient(135deg, #fef0f5 0%, #ffffff 100%);
    border-color: #f8c4d4;
    border-left: 3px solid #e91e63;
}
.message-text-content img {
    border-radius: 10px;
    max-width: 100%;
    height: auto;
    margin: 8px 0;
    aspect-ratio: auto;
}
.ts-product .img-related {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 128px;
    height: 128px;
}
.message-popularity-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    z-index: 5;
}
.message-popularity-badge.badge--hot {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f65 100%);
    color: white;
}
.message-popularity-badge.badge--trending {
    background: linear-gradient(135deg, #e91e63 0%, #ff4081 100%);
    color: white;
}
.message-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #0088cc 0%, #0099de 100%);
    color: white !important;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 15px;
    border: none;
    cursor: pointer;
}
.message-cta-btn:hover {
    background: linear-gradient(135deg, #006699 0%, #0088cc 100%);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}
.message-cta-btn svg {
    flex-shrink: 0;
}
.messages__one .comment_link {
    display: none;
}
.message-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f2f5;
}
.message-share {
    display: flex;
    align-items: center;
    gap: 8px;
}
.message-share-label {
    font-size: 13px;
    color: #8a9aab;
}
.message-share-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: #f0f2f5;
    color: #65737e;
}
.share-btn:hover {
    transform: translateY(-2px);
}
.share-btn--telegram:hover {
    background: #0088cc;
    color: white;
}
.share-btn--twitter:hover {
    background: #000;
    color: white;
}
.share-btn--whatsapp:hover {
    background: #25d366;
    color: white;
}
.share-btn--copy:hover {
    background: #6c5ce7;
    color: white;
}
.share-btn--copy.copied {
    background: #00b894;
    color: white;
}
@media (max-width: 480px) {
    .messages_wrapper {
        gap: 6px;
    }
    .messages__one.message_parsed {
        padding: 12px 14px;
        border-radius: 12px;
    }
    .message-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .message-cta-btn {
        width: 100%;
        justify-content: center;
    }
    .message-share {
        justify-content: center;
    }
    .message-share-label {
        display: none;
    }
}

/* Channel share buttons */
.channel-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    flex-wrap: wrap;
}
.channel-share__label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}
.channel-share__buttons {
    display: flex;
    gap: 8px;
}
.channel-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.channel-share__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.channel-share__btn--telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: #fff;
}
.channel-share__btn--twitter:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}
.channel-share__btn--whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}
.channel-share__btn--copy:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}
.channel-share__btn--copy.copied {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

/* Sticky mobile CTA */
.sticky-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: none;
}
.sticky-mobile-cta--visible {
    transform: translateY(0);
}
@media (max-width: 768px) {
    .sticky-mobile-cta {
        display: block;
    }
}
.sticky-mobile-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
}
.sticky-mobile-cta__info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.sticky-mobile-cta__avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.sticky-mobile-cta__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.sticky-mobile-cta__name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sticky-mobile-cta__username {
    font-size: 12px;
    color: #64748b;
}
.sticky-mobile-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
}
.sticky-mobile-cta__btn:hover {
    color: #fff !important;
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .sticky-mobile-cta__inner {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* Recently viewed */
.recently-viewed {
    margin: 24px 0;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 2px solid #f2f5fd;
}
.recently-viewed__title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.recently-viewed__list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.recently-viewed__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    text-decoration: none;
    min-width: 180px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.recently-viewed__item:hover {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}
.recently-viewed__avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.recently-viewed__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.recently-viewed__name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recently-viewed__meta {
    font-size: 12px;
    color: #64748b;
}
