/* This stylesheet has been refactored to remove conflicting and redundant styles.
 * It now primarily focuses on the custom card design and specific element overrides.
 * All other layout and responsive behaviors are handled by Tailwind CSS.
 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    color: #374151;
}

/* Style for clickable item name */
.clickable-item-name {
    cursor: pointer;
    color: #2563eb;
    text-decoration: none;
}

.clickable-item-name:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Active tab styling */
.tab-btn.active {
    background-color: #ffffff;
    color: #1d4ed8;
    border-bottom-color: #3b82f6;
}

/* Corrected item card styling with flexbox and consistent spacing */
.item-card-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    background: #fff;
    box-shadow: 0px 14px 80px rgba(34, 35, 58, 0.2);
    padding: 25px;
    border-radius: 25px;
    transition: all 0.3s;
    height: auto;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.item-card-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-xl */
}

/* Media query for wider screens to use a grid layout */
@media (min-width: 768px) {
    #item-cards-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

/* Media query for desktop screens */
@media (min-width: 1024px) {
    #item-cards-container {
        grid-template-columns: repeat(3, minmax(450px, 1fr));
    }
}

/* Vote button container */
.vote-buttons-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem; /* Use a consistent gap */
}

/* Vote button styling */
.vote-btn {
    position: relative;
}

/* Vote count badge */
.vote-btn .vote-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #22c55e;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 9999px; /* Tailwind's rounded-full */
    height: 1.5rem;
    width: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.vote-btn.downvote .vote-count {
    background-color: #ef4444;
}

/* Share button styling */
.share-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #3b82f6;
    transition: color 0.15s ease-in-out;
    margin-right: 1.5rem; /* Add spacing to match vote buttons */
}

.share-btn:hover {
    color: #1d4ed8;
}

/* Custom scrollbar for dropdowns */
.max-h-60::-webkit-scrollbar {
    width: 8px;
}

.max-h-60::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.max-h-60::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.max-h-60::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Styles for the action menu on click */
.action-menu-container .menu-items {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
.action-menu-container.active .menu-items {
    display: flex; /* or block */
    opacity: 1;
}
