﻿.nostr-smartstore-blog {
    width: 100%;
}

.nostr-smartstore-blog-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.nostr-smartstore-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.12);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: nostr-smartstore-spin .75s linear infinite;
}

@keyframes nostr-smartstore-spin {
    to { transform: rotate(360deg); }
}

.nostr-bloglist-item-root {
    overflow: hidden;
}

.nostr-blogpost-text {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.nostr-blogpost-text.nostr-collapsed {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
    white-space: normal;
}

.nostr-text-toggle {
    text-decoration: none !important;
}

.nostr-relay-source-overlay {
    position: absolute;
    top: .75rem;
    right: .75rem;
    z-index: 2;
    max-width: calc(100% - 1.5rem);
    padding: .25rem .5rem;
    border-radius: .25rem;
    background: rgba(255, 255, 255, .92);
    color: #6c757d;
    font-size: .72rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .12);
}

.nostr-extra-images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.nostr-extra-image {
    display: block;
    min-height: 120px;
    max-height: 220px;
    overflow: hidden;
    border-radius: .25rem;
    background: #f8f9fa;
}

.nostr-extra-image img {
    width: 100%;
    height: 100%;
    min-height: 120px;
    max-height: 220px;
    object-fit: contain;
    display: block;
}

.nostr-smartstore-blog-status:empty {
    display: none;
}

@media (max-width: 767.98px) {
    .nostr-extra-images {
        grid-template-columns: 1fr;
    }

    .nostr-relay-source-overlay {
        top: .5rem;
        right: .5rem;
    }
}


.nostr-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.nostr-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.nostr-date,
.nostr-author,
.nostr-relay-source-inline {
    font-size: 12px;
    color: #6b7280;
}

.nostr-date {
    white-space: nowrap;
}

a.nostr-date:hover,
a.nostr-author:hover,
a.nostr-date:focus,
a.nostr-author:focus {
    color: #810041;
    text-decoration: underline;
}

.nostr-author {
    min-width: 0;
    word-break: break-word;
}

.nostr-text-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nostr-desc {
    margin: 0;
    color: #2f3136;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.nostr-desc.nostr-text-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.nostr-toggle-btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #1f2937;
    width: fit-content;
}

.nostr-toggle-btn:hover,
.nostr-toggle-btn:focus {
    text-decoration: underline;
    color: #111827;
    outline: none;
}

.nostr-btnrow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
}

.nostr-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.nostr-action-link:hover,
.nostr-action-link:focus {
    transform: translateY(-1px);
    text-decoration: none;
    outline: none;
}

.nostr-action-default {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
}

.nostr-action-default:hover,
.nostr-action-default:focus {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

.nostr-action-brand {
    background: #810041;
    border-color: #810041;
    color: #ffffff;
}

.nostr-action-brand:hover,
.nostr-action-brand:focus {
    background: #6d0037;
    border-color: #6d0037;
    color: #ffffff;
}

.nostr-action-info {
    background: #500082;
    border-color: #500082;
    color: #ffffff;
}

.nostr-action-info:hover,
.nostr-action-info:focus {
    background: #41006b;
    border-color: #41006b;
    color: #ffffff;
}

.nostr-action-secondary {
    background: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}

.nostr-action-secondary:hover,
.nostr-action-secondary:focus {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.nostr-image-stack {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.nostr-image-stack.count-1 {
    grid-template-columns: 1fr;
}

.nostr-image-stack.count-2,
.nostr-image-stack.count-3,
.nostr-image-stack.count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nostr-image-stack.count-3 .nostr-image-item:first-child {
    grid-column: 1 / -1;
    min-height: 220px;
}

.nostr-image-item {
    background: #f3f4f6;
    border: 1px solid #e5e5ea;
    border-radius: 10px;
    overflow: hidden;
    min-height: 150px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.nostr-image-stack.count-1 .nostr-image-item {
    min-height: 220px;
    height: 260px;
}

.nostr-image-link {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.nostr-post-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    background: #f3f4f6;
}


/* 4.2.0.8 unified like UI.
   Detail = normal labelled Smartstore button, no custom gold border.
   List/card = compact heart + count, theme outline-primary/primary.
   Active heart itself is filled gold in both variants. */
.nostr-like-bridge .nostr-like-heart-icon {
    transition: color .16s ease, transform .16s ease, text-shadow .16s ease;
}

.nostr-like-bridge.is-liked .nostr-like-heart-icon,
.nostr-like-bridge[data-nostr-liked="true"] .nostr-like-heart-icon {
    color: #e6ba66 !important;
    transform: scale(1.10);
    text-shadow: 0 0 1px rgba(0, 0, 0, .20);
}

.nostr-like-compact {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    overflow: visible;
    vertical-align: middle;
}

.nostr-like-compact .nostr-like-count {
    position: absolute;
    right: -.38rem;
    bottom: -.38rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .22rem;
    border: 1px solid rgba(0, 0, 0, .20);
    border-radius: 999px;
    background: #fff;
    color: #555;
    font-size: .64rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 1;
}

.nostr-like-compact .nostr-like-label {
    display: none !important;
}

.nostr-like-detail {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.nostr-like-detail .nostr-like-count {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Deliberately no custom border rule for .nostr-like-detail.is-liked. */
.nostr-like-bridge:disabled,
.nostr-like-bridge.is-unavailable {
    cursor: default;
    opacity: .55;
}

.nostr-like-bridge.is-busy {
    opacity: .65;
}
