/* Story Interactions Styles - Instagram-inspired */

/* Interaction Buttons */
.interaction-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px;
    color: var(--stripe-text-secondary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.interaction-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.interaction-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.interaction-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Like Button */
.like-btn i {
    color: var(--stripe-text-secondary);
    transition: color 0.2s ease;
}

.like-btn.active i,
.like-btn:hover:not(:disabled) i {
    color: #e74c3c;
}

.like-btn.active {
    color: #e74c3c;
}

/* Favorite Button */
.favorite-btn i {
    color: var(--stripe-text-secondary);
    transition: color 0.2s ease;
}

.favorite-btn.active i,
.favorite-btn:hover:not(:disabled) i {
    color: #f1c40f;
}

.favorite-btn.active {
    color: #f1c40f;
}

/* Confession Vote Button Styles */
.vote-btn {
    background: none;
    border: none;
    color: var(--stripe-text-secondary);
    /* Default gray */
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vote-btn i {
    font-size: 1.1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.vote-btn:hover {
    transform: scale(1.1);
}

.vote-btn:hover i {
    color: #d35400;
    /* Dark Orange Hover */
}

.vote-btn.voted {
    color: #d35400 !important;
    /* Dark Orange */
}

.vote-btn.voted i {
    color: #d35400;
    /* Dark Orange */
    filter: drop-shadow(0 0 5px rgba(211, 84, 0, 0.4));
    /* Subtle glow */
}

/* Comment Toggle Button */
.toggle-comments-btn {
    background: none;
    border: none;
    color: var(--stripe-text-secondary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-comments-btn:hover {
    color: var(--stripe-text-primary);
    transform: scale(1.05);
}


/* Confession Comments Styling */
.comments-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--stripe-border-primary);
    animation: fadeIn 0.3s ease;
}

.comments-list {
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar for comments */
.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: var(--stripe-border-secondary);
    border-radius: 3px;
}

.comment-item {
    font-size: 0.9rem;
    padding: 10px;
    background: var(--stripe-bg-tertiary);
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 2px solid var(--stripe-accent-secondary);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.comment-item>div:first-child {
    flex: 1;
    min-width: 0;
    /* Crucial: allows flex item to shrink below content size */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
}

.no-comments {
    font-size: 0.85rem;
    color: var(--stripe-text-muted);
    font-style: italic;
    opacity: 0.7;
}

.comment-form {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    /* Ensure container is full width */
}

.full-width-input {
    flex-grow: 1;
    /* Take all available space */
    width: 100%;
    /* Fallback */
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid var(--stripe-border-secondary);
    background: var(--stripe-bg-secondary);
    color: var(--stripe-text-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.full-width-input:focus {
    outline: none;
    border-color: var(--stripe-accent-primary);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
    /* Example accent glow */
}

.submit-comment-btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stripe-accent-primary);
    color: white;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    /* Prevent button from shrinking */
    transition: transform 0.2s ease, background 0.2s ease;
}

.submit-comment-btn:hover {
    transform: scale(1.1);
    background: var(--stripe-hover_overlay);
    /* Assuming available var or create logic */
    filter: brightness(1.1);
}

.submit-comment-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Heart Animation */
@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.animate-heart {
    animation: heartBeat 0.6s ease;
}

/* Star Animation */
@keyframes starPulse {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.3) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.animate-star {
    animation: starPulse 0.6s ease;
}

/* Count Animation */
@keyframes countPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.animate-count {
    animation: countPop 0.3s ease;
}

/* Story Card Hover Effect */
.story-card {
    transition: all 0.3s ease;
}

.story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .story-interactions {
        padding: 10px 15px !important;
        gap: 15px !important;
    }

    .interaction-btn i {
        font-size: 18px !important;
    }

    .interaction-btn .count {
        font-size: 13px !important;
    }

    .story-header {
        padding: 12px 15px !important;
    }

    .story-header img {
        width: 35px !important;
        height: 35px !important;
    }
}

/* Loading State */
.interaction-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 5px;
}

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

/* Interaction Stats (View count) */
.interaction-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--stripe-text-muted);
}

.interaction-stat i {
    font-size: 18px;
    font-size: 18px;
}

.interaction-stat .count {
    font-size: 14px;
}