/**
 * Share Price Feed Plugin Stylesheet
 * 
 * Styles for the share price feed shortcode output including
 * content items (posts, topics, replies) and BuddyPress activity items.
 */

/* Main container */
.spf-share-price-feed {
    margin: 3em 0;
    font-family: inherit;
}

/* Section title */
.spf-share-price-feed .spf-section-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 1em 0;
    padding: 0;
    color: inherit;
}

/* Items list */
.spf-share-price-feed .spf-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Content items (Posts, Topics, Replies) */
.spf-share-price-feed .spf-content-item {
    margin: 0 0 1.5em 0;
    padding: 1em;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
    transition: box-shadow 0.2s ease;
}

.spf-share-price-feed .spf-content-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.spf-share-price-feed .spf-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5em;
    gap: 1em;
}

.spf-share-price-feed .spf-content-title {
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    color: #333;
    flex: 1;
}

.spf-share-price-feed .spf-content-title:hover {
    color: #0073aa;
    text-decoration: underline;
}

.spf-share-price-feed .spf-content-type {
    font-size: 0.85em;
    padding: 0.25em 0.75em;
    background-color: #f0f0f0;
    border-radius: 3px;
    color: #666;
    white-space: nowrap;
}

.spf-share-price-feed .spf-content-meta {
    margin-bottom: 0.75em;
}

.spf-share-price-feed .spf-content-date {
    font-size: 0.9em;
    color: #666;
}

.spf-share-price-feed .spf-content-excerpt {
    font-size: 0.95em;
    line-height: 1.6;
    color: #555;
}

/* Activity items (BuddyPress) */
.spf-share-price-feed .spf-activity-item {
    margin: 0 0 1.5em 0;
    padding: 1.25em;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fafafa;
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.spf-share-price-feed .spf-activity-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.spf-share-price-feed .spf-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75em;
    gap: 1em;
}

.spf-share-price-feed .spf-activity-user {
    display: flex;
    align-items: center;
    gap: 0.75em;
    flex: 1;
}

.spf-share-price-feed .spf-activity-user img {
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}

.spf-share-price-feed .spf-activity-user a {
    font-weight: 600;
    text-decoration: none;
    color: #333;
}

.spf-share-price-feed .spf-activity-user a:hover {
    color: #0073aa;
    text-decoration: underline;
}

.spf-share-price-feed .spf-activity-time {
    font-size: 0.85em;
    color: #666;
    white-space: nowrap;
}

.spf-share-price-feed .spf-activity-content {
    margin: 0.75em 0;
    padding: 0.75em 0;
    line-height: 1.6;
    color: #444;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

.spf-share-price-feed .spf-activity-content p {
    margin: 0.5em 0;
}

.spf-share-price-feed .spf-activity-content p:first-child {
    margin-top: 0;
}

.spf-share-price-feed .spf-activity-content p:last-child {
    margin-bottom: 0;
}

.spf-share-price-feed .spf-activity-link {
    margin-top: 0.75em;
}

.spf-share-price-feed .spf-activity-link a {
    font-size: 0.9em;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.spf-share-price-feed .spf-activity-link a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Empty state */
.spf-share-price-feed .spf-empty-state {
}

.spf-share-price-feed .spf-empty-state p {
    margin: 0;
    font-style: italic;
}

/* Load More button */
.spf-share-price-feed .spf-load-more-wrapper {
    margin: 0.5em 0 1em 0;
    text-align: center;
}

.spf-share-price-feed .spf-load-more-button {
    display: inline-block;
    padding: 0.5em 2em;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    background-color: #0073aa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none;
    line-height: 1.5;
}

.spf-share-price-feed .spf-load-more-button:hover:not(:disabled) {
    background-color: #005177;
    transform: translateY(-1px);
}

.spf-share-price-feed .spf-load-more-button:active:not(:disabled) {
    transform: translateY(0);
}

.spf-share-price-feed .spf-load-more-button:disabled {
    cursor: not-allowed;
}

.spf-share-price-feed .spf-load-more-spinner {
    display: inline-block;
    margin-left: 0.5em;
    vertical-align: middle;
}

.spf-share-price-feed .spf-load-more-spinner .spinner {
    float: none;
    display: block;
    margin: 0;
    width: 20px;
    height: 20px;
    border-width: 2px;
    padding: 4px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #FFF;
    --_m: 
      conic-gradient(#0000 10%,#000),
      linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
    mask: var(--_m);
    -webkit-mask-composite: source-out;
    mask-composite: subtract;
    animation: l3 1s infinite linear;
}
@keyframes l3 {to{transform: rotate(1turn)}}

/* Responsive adjustments */
@media (max-width: 768px) {
    .spf-share-price-feed .spf-content-header,
    .spf-share-price-feed .spf-activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }

    .spf-share-price-feed .spf-content-type {
        align-self: flex-start;
    }

    .spf-share-price-feed .spf-activity-time {
        align-self: flex-start;
    }

    .spf-share-price-feed .spf-load-more-button {
        width: 100%;
        padding: 0.875em 1.5em;
    }
}
