/* Question Detail Page Styles */

.vote-button {
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.375rem;
    background-color: #f5f5f5;
    border: 1px solid #dbdbdb;
    margin-top: 1rem;
    color: #4a5568;
}

.vote-button:hover:not(:disabled) {
    color: #485fc7;
    background-color: #eef3ff;
    border-color: #485fc7;
}

.vote-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.vote-button.voted {
    color: white;
    background-color: #485fc7;
    border-color: #485fc7;
}

.vote-button.voted .vote-count {
    color: white;
}

.vote-count {
    font-weight: 500;
    color: inherit;
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid currentColor;
    opacity: 0.8;
}

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

/* Toast Notification Styles */
.vote-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.95rem;
    font-weight: 500;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in-out;
}

.vote-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.vote-toast-warning {
    background-color: #ffe08a;
    color: #947600;
    border-left: 4px solid #ffd83d;
}

.vote-toast-error {
    background-color: #f14668;
    color: white;
    border-left: 4px solid #cc0f35;
}

.vote-toast-info {
    background-color: #3e8ed0;
    color: white;
    border-left: 4px solid #296fa8;
}

/* Mobile responsive toast */
@media screen and (max-width: 768px) {
    .vote-toast {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .vote-toast.show {
        transform: translateY(0);
    }
}

/* Desktop/Tablet: non-sticky quote section */
.quote-sticky {
    position: relative;
}

/* Bottom fixed CTA for tablet and larger - hidden by default */
.bottom-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    padding: 0.75rem;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    border-top: 1px solid #eee;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    display: none;
}

.bottom-cta.show {
    transform: translateY(0);
}

@media screen and (min-width: 769px) {
    .bottom-cta {
        display: block;
    }
}

/* Mobile fixed quote section */
@media screen and (max-width: 768px) {
    .quote-sticky {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 30;
        background-color: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        
        /* Safe area for notched devices */
        padding: 0.75rem max(0.75rem, env(safe-area-inset-right)) 
                 calc(0.75rem + env(safe-area-inset-bottom)) 
                 max(0.75rem, env(safe-area-inset-left));
        
        /* Performance optimization - prevents shift when address bar appears/disappears */
        will-change: transform;
        transform: translateZ(0);
    }
    
    .quote-sticky .box {
        margin-bottom: 0 !important;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
        padding: 0;
    }
    
    .quote-sticky .title.is-5 {
        font-size: 1rem !important;
        font-weight: bold;
        margin-bottom: 0.75rem !important;
    }
    
    .quote-sticky .content {
        margin-bottom: 0.5rem !important;
    }
    
    .quote-sticky .content p {
        display: none;
    }
    
    .quote-sticky .label {
        display: none;
    }
    
    .quote-sticky .is-size-7 {
        display: none;
    }
    
    /* Add padding to the bottom of the content to prevent it from being hidden behind the fixed quote section */
    .main-content-column {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }
    
    /* Hide bottom CTA on mobile */
    .bottom-cta {
        display: none !important;
    }
}
