/* ============================================================================
   FEED COLUMN - Explorer / Results Panel
   ============================================================================ */

/* Feed Header with Controls */
.feed-filters-accordion {
    background: #fff;
    border-bottom: 1px solid #455c7f;
}

.filter-accordion-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1.3rem;
    font-weight: 500;
    color: #6b7280;
    background: #162640;
}

.filter-accordion-header:hover {
    background: #213657;
}

.filter-accordion-header .accordion-arrow {
    font-size: 1rem;
    color: #9ca3af;
    transition: transform 0.2s;
    margin-left: auto;
}

.filter-accordion-header.open .accordion-arrow {
    transform: rotate(180deg);
}

.filter-stats {
    font-size: 1.1rem;
    color: #6C47FF;
    font-weight: 600;
}

.filter-accordion-content {
    border-top: 1px solid #5d6d87;
}

.filters-section {
    padding: 1.2rem 1.5rem;
    background: #47556c;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.filter-label {
    display: block;
    font-size: 1.15rem;
    font-weight: 600;
    color: #374151;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    color: #1f2937;
    transition: all 0.2s;
}

.filter-input::placeholder {
    color: #9ca3af;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #6C47FF;
    box-shadow: 0 0 0 3px rgba(108, 71, 255, 0.1);
}

.filter-select option {
    background: #fff;
    color: #333;
}

.filter-hint {
    font-size: 1.05rem;
    color: #9ca3af;
    margin-top: -0.2rem;
}

.filter-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.filter-actions .btn {
    flex: 1;
    padding: 0.7rem 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-actions .btn-primary {
    background: linear-gradient(135deg, #6C47FF 0%, #5536E6 100%);
    color: white;
}

.filter-actions .btn-primary:hover {
    background: linear-gradient(135deg, #5536E6 0%, #4225CC 100%);
    transform: translateY(-1px);
}

.filter-actions .btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.filter-actions .btn-secondary:hover {
    background: #d1d5db;
}

/* Feed Header with Controls */
.feed-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    height: 100%;
}

.feed-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem;
}

.btn-filter-toggle,
.btn-my-posts {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 0.6rem;
    font-size: 1.3rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-filter-toggle:hover,
.btn-my-posts:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-filter-toggle.active {
    background: #6C47FF;
    color: white;
}

.btn-my-posts.active {
    background: #6C47FF;
    color: white;
}

/* Feed Filters Section */
.feed-filters {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.4rem;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1.3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.2s;
}

.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #6C47FF;
    background: rgba(255, 255, 255, 0.15);
}

.filter-select option {
    background: #1a1a1a;
    color: white;
}

.filter-hint {
    display: block;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.3rem;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.filter-actions .btn {
    padding: 0.8rem 1.6rem;
    font-size: 1.3rem;
}

.btn-sm {
    padding: 0.7rem 1.4rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-primary {
    background: #6C47FF;
    color: white;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #5536E6;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* View Mode Switcher */
.view-modes {
    display: flex;
    gap: 0;
    padding: 0;
    background: #2d3748;
    flex: 1;
    height: 100%;
}

.view-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 1rem 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s;
    position: relative;
    flex: 1;
    color: rgba(255, 255, 255, 0.6);
}

.view-mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.view-mode-btn.active {
    background: #1e293b;
    color: #60a5fa;
    border-bottom: 0.1875rem solid #60a5fa;
}

.view-mode-btn.disabled,
.view-mode-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.view-mode-icon {
    font-size: 1.5rem;
}

.view-mode-label {
    font-size: 1rem;
    font-weight: 500;
    color: inherit;
}

.view-mode-btn.active .view-mode-label {
    color: inherit;
}

.view-mode-count {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 0.625rem;
    min-width: 1rem;
    text-align: center;
}

/* Feed Container */
.feed-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #374151;
}

/* Posts List - Chat Style */
.posts-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Post Link - Remove default link styling */
.post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.post-link:hover {
    transform: translateY(-2px);
}

.post-link:active {
    transform: translateY(0);
}

/* Post Wrapper - Contains avatar + card + actions */
.post-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 100%;
}

.post-wrapper.own {
    flex-direction: row-reverse;
}

.post-wrapper.other {
    flex-direction: row;
}

/* Post Card Base */
.post-card {
    flex: 1;
    max-width: 100%;
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(0.625rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-wrapper.own .post-card {
    background: #d9fdd3;
}

.post-wrapper.other .post-card {
    background: #ffffff;
}

/* Post Header */
.post-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.375rem;
    position: relative;
}

.post-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: #075e54;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-boost-stats {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #667781;
}

.boost-stat,
.pulse-stat,
.gem-stat,
.comment-stat {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.4rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0.75rem;
    white-space: nowrap;
}

.post-time {
    margin-left: auto;
}

.own-badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6C47FF;
    background: rgba(108, 71, 255, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(108, 71, 255, 0.2);
}

.photo-badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.post-actions-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.post-edit-btn,
.post-delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #667781;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
}

.post-edit-btn:hover {
    background: rgba(108, 71, 255, 0.1);
    color: #6C47FF;
}

.post-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Post Avatar - Now outside the card */
.post-avatar {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    
    border-radius: 50%;
    border: 2px solid rgba(0, 200, 100, 0.3);
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.1);
    overflow: visible;
}

.post-avatar img {
    /* Remove background and border when displaying actual avatar images */
    background: transparent;
    border: none;
    box-shadow: none;
    width: 100%;
}

.post-time {
    font-size: 0.6875rem;
    color: #667781;
    margin-left: auto;
}

/* Post Boost (deprecated - kept for backwards compatibility) */
.post-boost {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    border-radius: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-left: 0.5rem;
    box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.2);
}

/* Boost Button (in post-actions) */
.boost-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    box-shadow: 0 0.125rem 0.375rem rgba(245, 158, 11, 0.3);
}

.boost-btn:hover {
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.25rem 0.5rem rgba(245, 158, 11, 0.4);
}

/* Post Content */
.post-content {
    font-size: 0.875rem;
    line-height: 1.4;
    color: #111b21;
    word-wrap: break-word;
}

.post-content p {
    margin: 0;
}

/* Post Featured Image */
.post-featured-image {
    margin-top: 0.75rem;
    border-radius: 0.5rem;
    overflow: hidden;
    max-height: 400px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
}

/* Post Badges */
.post-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.post-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.75rem;
    font-size: 0.6875rem;
    font-weight: 500;
}

.badge-location {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-event {
    background: #f3e5f5;
    color: #6a1b9a;
}

.badge-price {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 600;
}

.badge-board {
    background: #fff3e0;
    color: #e65100;
}

/* Post Media */
.post-media {
    margin-top: 0.5rem;
    border-radius: 0.375rem;
    overflow: hidden;
}

.post-media img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Actions - Right side badge */
.post-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-right: -1rem;
    margin-top: 0.25rem;
}

.post-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    padding: 0.375rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    border: none;
    background: #4b5563;
    cursor: pointer;
    font-size: 0.75rem;
    color: #e5e7eb;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    border-radius: 0.5rem 0 0 0.5rem;
}

.post-action-btn:hover {
    background: #374151;
    transform: scale(1.05);
}

.post-action-btn span:first-child {
    font-size: 1rem;
}

.post-action-btn span:last-child {
    font-size: 0.6875rem;
    font-weight: 600;
}

/* ============================================================================
   COMMERCE CARDS (Store View)
   ============================================================================ */

.post-card.commerce-card {
    max-width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.commerce-header {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.commerce-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
}

.commerce-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.commerce-price-tag {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: #2e7d32;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.3);
}

.commerce-body {
    padding: 0.75rem;
}

.commerce-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111b21;
    margin-bottom: 0.25rem;
}

.commerce-description {
    font-size: 0.8125rem;
    color: #667781;
    line-height: 1.4;
}

.commerce-cta {
    margin-top: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: #25d366;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.commerce-cta:hover {
    background: #20ba5a;
}

/* ============================================================================
   EVENT CARDS (Calendar View)
   ============================================================================ */

.post-card.event-card {
    max-width: 100%;
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
}

.event-date-block {
    flex-shrink: 0;
    width: 3.5rem;
    text-align: center;
    padding: 0.5rem;
    background: #f3e5f5;
    border-radius: 0.375rem;
}

.event-month {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6a1b9a;
    text-transform: uppercase;
}

.event-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6a1b9a;
    line-height: 1;
}

.event-details {
    flex: 1;
}

.event-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111b21;
    margin-bottom: 0.25rem;
}

.event-time {
    font-size: 0.8125rem;
    color: #667781;
    margin-bottom: 0.5rem;
}

.event-location {
    font-size: 0.8125rem;
    color: #1565c0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================================================
   LOCATION CARDS (Map View)
   ============================================================================ */

.post-card.location-card {
    max-width: 100%;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.location-pin {
    font-size: 1.25rem;
    color: #ea4335;
}

.location-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111b21;
}

.location-map {
    width: 100%;
    height: 8rem;
    background: #e0e0e0;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667781;
    font-size: 0.8125rem;
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111b21;
    margin-bottom: 0.5rem;
}

.empty-state-message {
    font-size: 0.9375rem;
    color: #667781;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    max-width: 25rem;
}

.empty-state-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 20rem;
}

.empty-state-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.empty-state-btn.primary {
    background: #1a73e8;
    color: white;
}

.empty-state-btn.primary:hover {
    background: #1557b0;
}

.empty-state-btn.secondary {
    background: #f1f3f4;
    color: #5f6368;
}

.empty-state-btn.secondary:hover {
    background: #e8eaed;
}

/* ============================================================================
   SCROLLBAR
   ============================================================================ */

.posts-list::-webkit-scrollbar {
    width: 0.375rem;
}

.posts-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.posts-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.25rem;
}

.posts-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   PULSE BUTTON
   ============================================================================ */

.post-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding-left: 1rem;
}

.boost-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(240, 147, 251, 0.3);
}

.boost-indicator:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(240, 147, 251, 0.4);
}

.boost-icon {
    font-size: 1rem;
}

.boost-value {
    font-size: 0.875rem;
    font-weight: 800;
}

.pulse-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 700;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.pulse-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.pulse-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pulse-btn.pulsing {
    opacity: 0.7;
    cursor: wait;
}

.pulse-btn.pulsed {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    cursor: not-allowed;
    opacity: 0.8;
}

.pulse-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.pulse-icon {
    font-size: 1rem;
}

.pulse-btn:not(.pulsed) .pulse-icon {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.pulse-count {
    font-size: 0.875rem;
    font-weight: 800;
}

.pulse-count-display {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    color: #667eea;
    font-size: 0.8125rem;
    font-weight: 700;
}

.pulse-count-display .pulse-icon {
    font-size: 1rem;
    animation: none;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 639px) {
    .view-modes {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .view-modes::-webkit-scrollbar {
        display: none;
    }

    .post-card {
        max-width: 90%;
    }
}