.ta-expandable-cards-container {
    display: flex;
    gap: 8px;
    overflow: hidden;
    overflow-x: auto;
    scrollbar-width: none;
}

.ta-expandable-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    width: 80px;
    min-width: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    outline: none;
}

.ta-expandable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    backdrop-filter: blur(2px);
    border-radius: inherit;
    z-index: 1;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.ta-expandable-card:hover::before,
.ta-expandable-card:focus::before {
    opacity: 0;
}

/* Title styling - vertical rotation for collapsed state */
.ta-expandable-card .card-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
    font-weight: 700;
    font-size: 20px;
    color: #FFFFFF;
    transition: all 0.3s ease;
    z-index: 5;
    position: relative;
    margin: 0;
    text-align: center;
    padding: 20px;
}

/* Description - hidden by default */
.ta-expandable-card .card-description {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    display: flex;
    align-items: end;
    justify-content: center;
    /* text-align: center; */
    font-size: 14px;
    line-height: 1.5;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.2);
    transition: opacity 0.7s ease, visibility 0.1s ease;
    z-index: 3;
    overflow-y: auto;
}

/* Hover/Focus states - works on both desktop and mobile */
.ta-expandable-card:hover,
.ta-expandable-card:focus {
    width: 300px;
    min-width: 300px;
}

.ta-expandable-card:hover .card-title,
.ta-expandable-card:focus .card-title {
    top: 20%;
    transform: rotate(270deg);
    text-align: left;

}

.ta-expandable-card:hover .card-description,
.ta-expandable-card:focus .card-description {
    opacity: 1;
    visibility: visible;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .ta-expandable-cards-container {
        gap: 6px;
    }
    
    .ta-expandable-card {
        width: 60px;
        min-width: 60px;
    }
    
    .ta-expandable-card:hover,
    .ta-expandable-card:focus {
        width: 250px;
        min-width: 250px;
    }
    
    .ta-expandable-card .card-title {
        font-size: 12px;
    }
    
    .ta-expandable-card .card-description {
        font-size: 13px;
        padding: 15px;
    }
}


@media (max-width: 480px) {
    
    .ta-expandable-cards-container {
        flex-direction: column;
        height: auto !important;
        gap: 8px;
    }
    
    .ta-expandable-card {
        min-width: 100% !important;
        height: 60px !important;
        flex-direction: row;
        justify-content: flex-start;
        padding-left: 20px;
    }
    
    .ta-expandable-card .card-title {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        transform: none;
        margin-bottom: 0;
        padding: 0;
        position: relative;
        z-index: 4;
    }
    
    .ta-expandable-card:hover,
    .ta-expandable-card:focus {
        height: 350px !important;
        min-height: 120px;
    }
    
    .ta-expandable-card:hover .card-title,
    .ta-expandable-card:focus .card-title {
        opacity: 1;
        visibility: visible;
        transform: none;
        top: 50%;
        z-index: 4;
    }

}

@media (hover: none) and (pointer: coarse) {
    .ta-expandable-card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .ta-expandable-card:active {
        width: 300px;
        min-width: 300px;
    }
    
    .ta-expandable-card:active::before {
        opacity: 0;
    }
    
    .ta-expandable-card:active .card-description {
        opacity: 1;
        visibility: visible;
    }
}

.ta-expandable-cards-container::after {
    content: '';
    flex: 1;
    min-width: 0;
}

.ta-expandable-card:hover,
.ta-expandable-card:focus,
.ta-expandable-card:active {
    z-index: 10;
}

.ta-expandable-cards-container .ta-expandable-card {
    transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease;
}

.ta-expandable-card {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
} 
