/**
 * Nostr Previews Component
 * Styles for Nostr event and profile preview cards
 * Converted from SCSS to plain CSS
 */

.nostr-article-preview.card {
    padding-bottom: var(--spacing-2);
    background: var(--color-bg-light);
}

.nostr-preview {
    margin-top: var(--spacing-2);
}

.nostr-preview .nostr-event-preview,
.nostr-preview .nostr-profile-preview {
    border-left: 3px solid var(--color-nostr);
    box-shadow: var(--shadow-sm);
}

.nostr-preview .nostr-profile-preview {
    border-left-color: var(--color-nostr-profile);
}

.nostr-preview .card-text {
    font-size: 0.9rem;
}

.nostr-preview .card-footer {
    padding: var(--spacing-2) var(--spacing-3);
}

.nostr-previews h6 {
    font-size: 0.9rem;
    margin-bottom: var(--spacing-3);
}

.nostr-previews .preview-container {
    max-height: 500px;
    overflow-y: auto;
    padding-right: var(--spacing-2);
}

/* Article preview card */
.nostr-article-preview .article-preview-image img {
    max-height: 200px;
    width: 100%;
    object-fit: cover;
}

.nostr-article-preview .card-title a {
    color: var(--color-text);
    transition: color 0.2s;
}

.nostr-article-preview .card-title a:hover {
    color: var(--color-primary);
}

/* Style for nostr links in text */
.nostr-link {
    color: var(--color-nostr);
    background-color: var(--color-nostr-bg);
    padding: 0 var(--spacing-1);
    border-radius: 0;
    text-decoration: none;
}

.nostr-link:hover {
    background-color: var(--color-nostr-bg);
    filter: brightness(0.9);
}


.event-container {
    max-width: 800px;
    margin: var(--spacing-5) auto;
    background: var(--color-bg);
    border-radius: 0;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-3);
}

.event-content {
    padding: var(--spacing-3);
    font-size: var(--font-size-lg);
    line-height: 1.6;
}

.event-content img {
    max-width: 100%;
}

/* NIP-68 Picture Event Styles */
.content-warning {
    background-color: var(--color-warning-bg);
    border: 2px solid var(--color-warning);
    padding: var(--spacing-3);
    border-radius: 0;
    margin-bottom: var(--spacing-3);
    text-align: center;
}

.btn-show-nsfw {
    margin-top: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-3);
    background-color: var(--color-warning);
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: bold;
}

.btn-show-nsfw:hover {
    filter: brightness(0.9);
}

.picture-location {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-3);
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.location-icon {
    font-size: 1.2rem;
}

.geohash {
    background-color: var(--color-bg-light);
    padding: 0.2rem var(--spacing-2);
    border-radius: 0;
    font-family: monospace;
    font-size: 0.85rem;
    cursor: help;
}

.picture-source {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-3);
    font-size: 0.95rem;
}

.source-label {
    font-weight: 600;
    color: var(--color-text-mid);
    flex-shrink: 0;
}

.source-link {
    color: var(--color-info);
    text-decoration: none;
    word-break: break-all;
}

.source-link:hover {
    text-decoration: underline;
}

.nostr-links {
    margin: var(--spacing-4) 0;
    padding: var(--spacing-3);
    background-color: var(--color-bg-light);
    border-radius: 0;
}

.link-list {
    list-style: none;
    padding-left: 0;
}

.link-list li {
    word-break: break-all;
}

.link-type {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-left: var(--spacing-2);
}

.event-footer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--spacing-3);
    border-top: 1px solid var(--color-border);
}

.event-tags {
    flex: 1;
}

.event-tags ul, .event-references ul {
    list-style-type: none;
    padding-left: 0;
}

.event-tags li, .event-references li {
    margin-bottom: 0.5rem;
}

.error {
    color: var(--color-error);
    padding: var(--spacing-3);
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .picture-gallery {
        grid-template-columns: 1fr;
    }
}

.embedded-event-card {
    border: none;
    border-radius: 0;
    padding: var(--spacing-3);
    margin: var(--spacing-2) 0;
    background: var(--color-bg-light);
}

.embedded-event-card .event-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-2);
}

.embedded-event-card .avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.embedded-event-card .author-info {
    flex: 1;
}

.embedded-event-card .nip05 {
    color: var(--color-text-muted);
    font-size: 0.85em;
}

.embedded-event-card .event-meta {
    color: var(--color-text-muted);
    font-size: 0.8em;
}

.embedded-event-card .event-content {
    margin: var(--spacing-2) 0;
    line-height: 1.4;
}

.embedded-event-card .event-footer {
    text-align: right;
}

.embedded-event-card .view-full {
    color: var(--color-info);
    text-decoration: none;
    font-size: 0.85em;
}

/* Placeholder for missing / unfetchable nostr events */
.nostr-placeholder {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: var(--spacing-3) 0;
    padding: var(--spacing-2) var(--spacing-3);
    border: 1px dashed var(--color-border);
    border-radius: 0;
    background: var(--color-bg-light);
    color: var(--color-text-mid);
    font-size: 0.9rem;
    line-height: 1.4;
}

.nostr-placeholder-icon {
    flex-shrink: 0;
    opacity: 0.5;
}

.nostr-placeholder-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.nostr-placeholder-label {
    font-weight: 500;
}

.nostr-placeholder-ref {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--color-nostr);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nostr-placeholder-ref:hover {
    text-decoration: underline;
}
