/* Rich Text Editor Styles */
.rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px;
    background-color: var(--bg-secondary);
    border-radius: 8px 8px 0 0;
    margin-bottom: 5px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Pump Post Button Styles */
.toolbar-button.pump-button {
    background: linear-gradient(45deg, #ff4d4d, #ff9f1a);
    color: white;
    font-weight: bold;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.toolbar-button.pump-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 77, 77, 0.3);
    background: linear-gradient(45deg, #ff6a6a, #ffb84d);
}

.toolbar-button.pump-button:active {
    transform: translateY(0);
}

/* Pumped Post Indicator Styles */
.pumped-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

.pumped-tier-1 {
    background: linear-gradient(45deg, #ff9500, #ff5e3a);
    color: white;
}

.pumped-tier-2 {
    background: linear-gradient(45deg, #ff5e3a, #ff3a6e);
    color: white;
}

.pumped-tier-3 {
    background: linear-gradient(45deg, #ff3a6e, #a93aff);
    color: white;
}

.pumped-tier-4 {
    background: linear-gradient(45deg, #a93aff, #3a9fff);
    color: white;
    box-shadow: 0 0 10px rgba(169, 58, 255, 0.5);
}

/* Pump Modal Styles */
.pump-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.pump-modal.visible {
    opacity: 1;
    visibility: visible;
}

.pump-modal-content {
    background-color: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.pump-modal.visible .pump-modal-content {
    transform: translateY(0);
}

.pump-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.pump-modal-header h3 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pump-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

.pump-amount-container {
    margin-bottom: 20px;
}

.pump-amount-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.pump-amount-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.pump-slider {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.pump-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff4d4d, #ff9f1a);
    cursor: pointer;
}

.pump-preview {
    background: linear-gradient(45deg, #f3f4f6, #ffffff);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    transition: all 0.3s;
}

.pump-preview h4 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pump-preview p {
    margin: 5px 0;
    font-size: 1rem;
    font-weight: 600;
}

.pump-preview small {
    display: block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #666;
}

.pump-tier-1 {
    background: linear-gradient(45deg, #ff9500, #ff5e3a);
    color: white;
}

.pump-tier-2 {
    background: linear-gradient(45deg, #ff5e3a, #ff3a6e);
    color: white;
}

.pump-tier-3 {
    background: linear-gradient(45deg, #ff3a6e, #a93aff);
    color: white;
}

.pump-tier-4 {
    background: linear-gradient(45deg, #a93aff, #3a9fff);
    color: white;
}

.pump-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.pump-cancel-button {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.pump-confirm-button {
    padding: 10px 20px;
    border: none;
    background: linear-gradient(45deg, #ff4d4d, #ff9f1a);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.pump-confirm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 77, 77, 0.3);
}

.pump-confirm-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Pumped badge styles */
.pumped-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px 8px !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    margin-left: 8px !important;
    color: white !important;
    animation: pumped-pulsate 2s infinite !important;
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.7) !important;
    transform-origin: center !important;
    position: relative !important;
    z-index: 5 !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5) !important;
    letter-spacing: 0.5px !important;
}

/* Add a stronger animation for the pumped badge */
@keyframes pumped-pulsate {
    0% {
        transform: scale(1) !important;
        box-shadow: 0 0 15px rgba(255, 77, 77, 0.7) !important;
        filter: brightness(1) !important;
    }

    50% {
        transform: scale(1.15) !important;
        box-shadow: 0 0 25px rgba(255, 77, 77, 0.9) !important;
        filter: brightness(1.3) !important;
    }

    100% {
        transform: scale(1) !important;
        box-shadow: 0 0 15px rgba(255, 77, 77, 0.7) !important;
        filter: brightness(1) !important;
    }
}

.pumped-badge.pump-tier-1 {
    background: linear-gradient(45deg, #ff9500, #ff5e3a) !important;
}

.pumped-badge.pump-tier-2 {
    background: linear-gradient(45deg, #ff5e3a, #ff3a6e) !important;
    animation-duration: 1.8s !important;
    box-shadow: 0 0 20px rgba(255, 62, 110, 0.8) !important;
}

.pumped-badge.pump-tier-3 {
    background: linear-gradient(45deg, #ff3a6e, #a93aff) !important;
    animation-duration: 1.6s !important;
    box-shadow: 0 0 22px rgba(169, 58, 255, 0.9) !important;
}

.pumped-badge.pump-tier-4 {
    background: linear-gradient(45deg, #a93aff, #3a9fff) !important;
    animation-duration: 1.4s !important;
    box-shadow: 0 0 25px rgba(58, 159, 255, 1) !important;
}

.pump-wallet-warning {
    padding: 10px;
    background-color: #fff5f5;
    border: 1px solid #f56565;
    color: #c53030;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.875rem;
}

.post-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Specific styling for the pump button in the post actions */
#pump-post-button {
    padding: 0.75rem 1.25rem;
    border: none;
    background: linear-gradient(45deg, #ff4d4d, #ff9f1a);
    color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: pulsate 2s infinite;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
}

#pump-post-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.7);
}

@keyframes pulsate {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 77, 77, 0.8);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 77, 77, 0.5);
    }
}

.pumped-post-button {
    background: linear-gradient(45deg, #ff4d4d, #ff9f1a);
    color: white;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

.toolbar-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
    margin: 0 5px;
    align-self: center;
}

.rich-text-enabled {
    min-height: 120px;
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    padding: 10px;
    background-color: var(--bg-primary);
    outline: none;
    transition: border-color 0.3s;
    overflow-y: auto;
}

.rich-text-enabled:focus {
    border-color: var(--accent-primary);
}

.rich-text-enabled * {
    max-width: 100%;
}

.rich-text-enabled img {
    max-height: 300px;
    object-fit: contain;
    margin: 5px 0;
}

.compose-section .rich-text-enabled {
    height: auto;
    max-height: 300px;
}

.expanded-compose .rich-text-enabled {
    max-height: 50vh;
}

.char-count-warning {
    color: var(--warning);
}

.char-count-error {
    color: var(--error);
}

/* Pumped post styles */
.pumped-post {
    position: relative !important;
    overflow: visible !important;
}

.pumped-post::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 12px;
    background: linear-gradient(45deg, rgba(255, 77, 77, 0.3), rgba(255, 159, 26, 0.3));
    z-index: -1;
    animation: glow-border 2s infinite;
}

.pumped-post.pump-tier-2::before {
    background: linear-gradient(45deg, rgba(255, 94, 58, 0.3), rgba(255, 58, 110, 0.3));
}

.pumped-post.pump-tier-3::before {
    background: linear-gradient(45deg, rgba(255, 58, 110, 0.3), rgba(169, 58, 255, 0.3));
}

.pumped-post.pump-tier-4::before {
    background: linear-gradient(45deg, rgba(169, 58, 255, 0.3), rgba(58, 159, 255, 0.3));
}

@keyframes glow-border {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Ensure trending posts still have their left border */
.trending-post {
    border-left: 4px solid var(--primary-purple) !important;
}

/* ===== New Post Highlight Animation ===== */
.highlight-new {
    animation: highlight-new-post 2.5s ease-out;
}

@keyframes highlight-new-post {
    0% {
        background-color: rgba(139, 92, 246, 0.15);
        box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
    }

    70% {
        background-color: rgba(139, 92, 246, 0.05);
        box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.1);
    }

    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

/* ===== Meer Button Loading State ===== */
.post-button.loading {
    pointer-events: none;
    opacity: 0.85;
    position: relative;
}

.post-button.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* ===== Post Success Toast ===== */
.post-success-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1f2937;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-success-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.post-success-toast .checkmark {
    color: #10B981;
    font-size: 1.1rem;
}