/* Reddit-style voting component - optimized */

/* Base container */
.itinerary-vote-container {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    min-width: 50px;
}

/* Wrapper for dynamically injected widgets */
.itinerary-vote-widget-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Vote buttons */
.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #878A8C;
    font-size: 20px;
    transition: all 0.15s ease;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-btn:hover {
    background: #e9ecef;
}

.vote-btn:active {
    transform: scale(0.95);
}

.vote-btn.active.vote-up {
    color: #FF4500;
}

.vote-btn.active.vote-down {
    color: #7193FF;
}

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

/* Score display */
.vote-score {
    font-size: 16px;
    font-weight: bold;
    color: #1c1c1c;
    padding: 4px 0;
    min-width: 36px;
    text-align: center;
    user-select: none;
}

.vote-score.positive {
    color: #FF4500;
}

.vote-score.negative {
    color: #7193FF;
}

/* Desktop layout (≥768px) */
@media (min-width: 768px) {
    /* Hide mobile voting on desktop */
    .itinerary-voting-mobile {
        display: none !important;
    }
    
    /* Desktop sidebar: vertical with sticky */
    .itinerary-voting-sidebar .itinerary-vote-container {
        flex-direction: column;
        position: sticky;
        top: 80px;
    }
}

/* Mobile/Tablet layout (<768px) */
@media (max-width: 767px) {
    /* Hide desktop sidebar on mobile */
    .itinerary-voting-sidebar {
        display: none !important;
    }
    
    /* Mobile: horizontal pill layout */
    .itinerary-vote-container {
        flex-direction: row;
        padding: 6px 12px;
        gap: 12px;
        border-radius: 50px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        min-width: auto;
    }
    
    /* Larger touch targets on mobile */
    .vote-btn {
        font-size: 22px;
        padding: 6px 10px;
    }
    
    .vote-score {
        font-size: 18px;
        font-weight: 700;
        min-width: 40px;
    }
}

/* Inline voting (homepage injection): always horizontal pill */
.itinerary-vote-widget-wrapper .itinerary-vote-container {
    flex-direction: row;
    padding: 8px 16px;
    gap: 12px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: static;
    min-width: auto;
}

.itinerary-vote-widget-wrapper .vote-btn {
    font-size: 22px;
    padding: 6px 10px;
}

.itinerary-vote-widget-wrapper .vote-score {
    font-size: 18px;
    font-weight: 700;
    min-width: 40px;
}
