/* Twitter-like Layout Styles for Homepage */

/* Flash Item - Restructured layout */
.flash-item,
.post-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

/* Ensure inner links inherit style */
.flash-item a,
.post-item a {
    text-decoration: none;
    color: inherit;
}

.flash-title .content-link,
.post-title .content-link,
.flash-title .content-link:visited,
.post-title .content-link:visited {
    color: inherit;
    text-decoration: none;
}

.flash-image a,
.post-image a {
    display: block;
    color: inherit;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.flash-item:hover,
.post-item:hover {
    cursor: pointer;
    background-color: var(--bg-hover);
    /* Optional: explicit hover bg if needed */
}

/* Publisher Header - Top section */
.flash-header,
.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

/* Publisher info - Now in flash-content */
.content-publisher {
    display: flex;
    align-items: center;
    flex: 1;
    margin-bottom: 10px;
    min-width: 0;
}

.publisher-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.publisher-image {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.publisher-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.publisher-info {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
}

.publisher-name {
    font-size: var(--font-15);
    font-weight: 500;
    color: var(--text-primary);
}



/* Action icons - Now in flash-meta */
.flash-actions,
.post-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.flash-action-btn,
.post-action-btn {
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    background: transparent;
}

.flash-action-btn:hover,
.post-action-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.flash-action-btn span,
.post-action-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bookmark icon - 21px and Share icon - 21px */
.flash-action-bookmark svg,
.flash-action-share svg,
.flash-action-menu svg,
.post-action-bookmark svg,
.post-action-share svg,
.post-action-menu svg {
    width: var(--font-21);
    height: var(--font-21);
}

/* Responsive Icon Visibility */
.icon-vertical {
    display: none !important;
}

.icon-horizontal {
    display: flex !important;
}

@media (max-width: 768px) {
    .icon-vertical {
        display: flex !important;
    }

    .icon-horizontal {
        display: none !important;
    }

    .flash-action-bookmark svg,
    .flash-action-share svg,
    .flash-action-menu svg,
    .post-action-bookmark svg,
    .post-action-share svg,
    .post-action-menu svg {
        width: 20px;
        height: 20px;
    }

}

/* Content Section */
.flash-body,
.post-body {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.flash-content,
.post-content {
    flex: 1;
    min-width: 0;
}

.flash-title,
.post-title {
    font-size: var(--font-18);
    font-weight: 600;
    margin-bottom: 0;
    margin-top: 0;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Meta section - Inside flash-body */
.flash-meta,
.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--font-14);
    color: var(--text-secondary);
    width: 100%;
}

.flash-meta .separator {
    margin: 0 6px;
}

.flash-date,
.post-date {
    color: var(--text-secondary);
    font-size: var(--font-14);
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-date-icon {
    color: #22c55e;
    /* Green color */
    width: 15px;
    height: 15px;
}

/* Featured Image - Right side */
.flash-image,
.post-image {
    width: 85px;
    height: 85px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.flash-image img,
.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flash-image .placeholder-image,
.post-image .placeholder-image {
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .flash-image,
    .post-image {
        width: 75px;
        height: 75px;
    }

    .flash-title,
    .post-title {
        font-size: var(--font-15);
    }

    .publisher-name {
        font-size: var(--font-14);
    }
}

/* Modern Tooltip Styles */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-text {
    visibility: hidden;
    width: 140px;
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 6px 10px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    pointer-events: none;
    white-space: normal;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text,
.tooltip-container:active .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Specific adjustment for post-date-icon tooltip */
.post-date-icon-container {
    display: inline-flex;
    margin-right: 4px;
    vertical-align: middle;
}