/* Notes Styles - Twitter-inspired design */

.notes-container {
    max-width: var(--width-default);
    margin: 0 auto;
    padding: 0;
}

.note {
    border-bottom: 1px solid #e1e8ed;
    padding: 12px 16px;
    transition: background-color 0.2s ease;
}

.note:hover {
    background-color: #f7f9fa;
}

.note:last-child {
    border-bottom: none;
}

/* Note Header */
.note-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.note-author {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.author-link {
    text-decoration: none;
    flex-shrink: 0;
}

.author-name-link,
.author-npub-link {
    text-decoration: none;
}

.author-name-link:hover .author-name {
    text-decoration: underline;
}

.author-npub-link:hover .author-npub {
    text-decoration: underline;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

.author-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #1da1f2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.author-info {
    min-width: 0;
    flex: 1;
}

.author-name {
    font-weight: bold;
    color: #14171a;
    font-size: 15px;
    line-height: 20px;
}

.author-npub {
    color: #657786;
    font-size: 15px;
    line-height: 20px;
}

.note-time {
    color: #657786;
    font-size: 15px;
    flex-shrink: 0;
    margin-left: 12px;
}

.note-time-link {
    text-decoration: none;
    color: #657786;
    transition: color 0.2s ease;
}

.note-time-link:hover {
    color: #1da1f2;
}

.note-time-link:hover time {
    text-decoration: underline;
}

.note-time time {
    text-decoration: none;
    color: inherit;
}

/* Note Content */
.note-content {
    margin-bottom: 12px;
}

.note-text {
    font-size: 23px;
    line-height: 32px;
    color: #14171a;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.note-text a {
    color: #1da1f2;
    text-decoration: none;
}

.note-text a:hover {
    text-decoration: underline;
}

.note-text .hashtag {
    color: #1da1f2;
    font-weight: 500;
}

.note-text .hashtag:hover {
    text-decoration: underline;
}

.nostr-ref-error {
    color: #e0245e;
    font-style: italic;
    font-size: 13px;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Repost Styles */
.repost-indicator {
    display: flex;
    align-items: center;
    color: #657786;
    font-size: 13px;
}

.repost-icon {
    width: 16px;
    height: 16px;
    fill: #657786;
    margin-right: 8px;
}

.reposted-note {
    border: 1px solid #e1e8ed;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
}

.repost-error {
    color: #e0245e;
    font-style: italic;
    padding: 12px;
    border: 1px solid #f7bcc8;
    background-color: #fdf2f4;
    border-radius: 8px;
}

/* Embedded Notes */
.embedded-note {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background-color: #f7f9fa;
}

.embedded-note-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.embedded-note-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.embedded-note-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1da1f2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.embedded-note-author {
    flex: 1;
    min-width: 0;
}

.embedded-note-name {
    font-weight: bold;
    font-size: 14px;
    color: #14171a;
}

.embedded-note-npub {
    font-size: 13px;
    color: #657786;
}

.embedded-note-time {
    font-size: 13px;
    color: #657786;
}

.embedded-note-content {
    font-size: 14px;
    line-height: 18px;
    color: #14171a;
    word-wrap: break-word;
    white-space: normal;
}

.embedded-note-header a {
    text-decoration: none;
}

.embedded-note-name:hover,
.embedded-note-npub:hover {
    text-decoration: underline;
}

/* Note Images */
.note-image {
    width: 100%;
    height: auto;
    margin: 12px 0;
    border: 1px solid #e1e8ed;
    display: block;
    border-radius: 8px;
}

.note-image:hover {
    cursor: pointer;
    opacity: 0.95;
}

/* Note Videos */
.note-video {
    width: 100%;
    height: auto;
    margin: 12px 0;
    border: 1px solid #e1e8ed;
    display: block;
    background-color: #000;
    border-radius: 8px;
}

.note-video:focus {
    outline: 2px solid #1da1f2;
    outline-offset: 2px;
}

/* Video Embeds (YouTube, etc.) */
.video-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 12px 0;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
}

/* Repost Styles */
.repost-indicator {
    display: flex;
    align-items: center;
    color: #657786;
    font-size: 13px;
    margin-bottom: 12px;
}

.repost-icon {
    width: 16px;
    height: 16px;
    fill: #657786;
    margin-right: 8px;
}

.reposted-note {
    border: 1px solid #e1e8ed;
    padding: 12px;
}

.reposted-note .note-content {
    margin-left: 0;
}

.reposted-note .note-header {
    margin-bottom: 8px;
}

.reposted-note .author-avatar,
.reposted-note .author-avatar-placeholder {
    width: 32px;
    height: 32px;
    margin-right: 8px;
}

.reposted-note .author-avatar-placeholder {
    font-size: 14px;
}

.reposted-note .author-name,
.reposted-note .author-npub,
.reposted-note .note-time {
    font-size: 13px;
}

.reposted-note .note-text {
    font-size: 15px;
    line-height: 20px;
}

.repost-error {
    color: #e0245e;
    font-style: italic;
    padding: 12px;
    border: 1px solid #f7bcc8;
    background-color: #fdf2f4;
}

/* Note Footer */

.note-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.note-action {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    color: #657786;
}

.note-action:hover {
    background-color: rgba(29, 161, 242, 0.1);
}

.note-action svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.reply-action:hover {
    background-color: rgba(29, 161, 242, 0.1);
    color: #1da1f2;
}

.repost-action:hover {
    background-color: rgba(23, 191, 99, 0.1);
    color: #17bf63;
}

.like-action:hover {
    background-color: rgba(224, 36, 94, 0.1);
    color: #e0245e;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #e1e8ed;
    max-width: var(--width-default);
    margin-left: auto;
    margin-right: auto;
}

.pagination-link {
    background-color: #1da1f2;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.pagination-link:hover {
    background-color: #1a91da;
}

.pagination-info {
    color: #657786;
    font-size: 14px;
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    max-width: var(--width-default);
    margin: 0 auto;
}

.empty-state h1 {
    color: #14171a;
    margin-bottom: 16px;
    font-size: 31px;
    font-weight: 800;
}

.empty-state p {
    color: #657786;
    font-size: 15px;
    line-height: 20px;
}

/* Event Detail Page */
.replies-section {
    margin-top: 20px;
    border-top: 1px solid #e1e8ed;
}

.replies-header {
    font-size: 19px;
    font-weight: 800;
    color: #14171a;
    padding: 16px;
    margin: 0;
    border-bottom: 1px solid #e1e8ed;
}

.no-replies {
    text-align: center;
    padding: 40px 20px;
    color: #657786;
    font-size: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notes-container {
        margin: 0 -16px;
    }
    
    .note {
        padding: 12px 16px;
    }
    
    .note-content {
        margin-left: 0;
    }
    
    .note-footer {
        margin-left: 0;
    }
    
    .note-text {
        font-size: 16px;
        line-height: 24px;
    }
    
    .note-image {
        margin: 8px 0;
    }
    
    .note-video {
        margin: 8px 0;
    }
    
    .pagination {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-info {
        order: 1;
    }
    
    .pagination-prev {
        order: 0;
    }
    
    .pagination-next {
        order: 2;
    }
}

@media (max-width: 480px) {
    .author-avatar,
    .author-avatar-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .author-avatar-placeholder {
        font-size: 16px;
    }
    
    .note-header {
        margin-bottom: 8px;
    }
    
    .note-text {
        font-size: 15px;
        line-height: 20px;
    }
    
    .note-image {
        margin: 6px 0;
    }
    
    .note-video {
        margin: 6px 0;
    }
    
    .note-actions {
        gap: 16px;
    }
    
    .note-action {
        padding: 6px;
    }
    
    .note-action svg {
        width: 16px;
        height: 16px;
    }
}

/* Longform Event Card */
.longform-card {
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-primary, #fff);
    transition: box-shadow 0.2s ease;
}

.longform-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.longform-card-image {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    background: #f7f9fa;
}

.longform-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.longform-card-content {
    padding: 16px;
}

.longform-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #14171a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.longform-card-summary {
    font-size: 15px;
    color: #657786;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.longform-card-link {
    display: inline-flex;
    align-items: center;
    color: #1da1f2;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
}

.longform-card-link:hover {
    color: #1a91da;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .longform-card-image {
        max-height: 200px;
    }

    .longform-card-title {
        font-size: 18px;
    }

    .longform-card-summary {
        font-size: 14px;
    }
}
