/* Traits Vials Container - Vertical Layout on Left Side */
.traits-container {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px 5px;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: auto !important;
    height: 100vh !important;
    max-width: 100px !important;
    z-index: 10005 !important; /* Above everything including hamburger */
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important; /* Don't block clicks on cards below */
    box-sizing: border-box;
    background: linear-gradient(90deg, rgba(20, 15, 30, 0.95) 0%, rgba(20, 15, 30, 0.7) 100%);
    backdrop-filter: blur(5px);
}

/* Individual Trait Vial - Vertical on Left Side */
.trait-vial {
    position: relative;
    width: 90px;
    height: 240px;
    transition: all 0.3s ease;
    cursor: url('../images/cursor.png') 16 16, pointer;
    pointer-events: auto; /* Re-enable pointer events on vials themselves */
}

.trait-vial:hover {
    transform: scale(1.05);
    filter: brightness(1.2) drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
}

/* Hide unused elements */
.trait-icon,
.trait-label,
.trait-value {
    display: none;
}

/* Vial Image Container */
.trait-progress-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.trait-progress-bar {
    display: none; /* Hide the old bar */
}

/* Base vial image (empty/outline) */
.trait-vial::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

/* Fill layer that shows progress */
.trait-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: opacity 0.5s ease;
    z-index: 2;
    clip-path: inset(0 0 0 0);
}

/* Individual vial images - all use CSS variable set by JavaScript */
#luck-vial::before {
    background-image: var(--vial-image, url('../images/vials/luck-empty.png'));
}

#speed-vial::before {
    background-image: var(--vial-image, url('../images/vials/speed-empty.png'));
}

#hints-vial::before {
    background-image: var(--vial-image, url('../images/vials/hints-empty.png'));
}

/* Hide all fill layers - all vials now use swappable images */
.trait-fill {
    display: none;
}

/* Tooltip for vials */
.trait-vial::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
    background: rgba(20, 15, 30, 0.95);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    padding: 8px 15px;
    color: #ffd700;
    font-size: 1em;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10006;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.trait-vial:hover::after {
    opacity: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .traits-container {
        gap: 10px;
        padding: 10px 3px;
        max-width: 70px !important;
    }

    .trait-vial {
        width: 60px;
        height: 150px;
    }

    .trait-vial::after {
        font-size: 0.85em;
        padding: 5px 10px;
    }
}

@media (max-width: 480px) {
    .traits-container {
        gap: 8px;
        padding: 8px 2px;
        max-width: 50px !important;
    }

    .trait-vial {
        width: 45px;
        height: 120px;
    }

    .trait-vial::after {
        font-size: 0.75em;
        padding: 4px 8px;
    }
}
