/* H2H Bar Section - thscore2 style */
.h2h-bar-cell {
    padding: 12px 15px !important;
    background: #f5f5f5;
    border: none !important;
}

/* X-Bar: Horizontal bar charts */
.x-bar {
    margin-bottom: 12px;
}

.x-bar .tit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.x-bar .tit .left {
    text-align: left;
}

.x-bar .tit .right {
    text-align: right;
}

.x-bar .tit .center {
    text-align: center;
    color: #666;
    font-size: 12px;
}

.x-bar .win-f {
    color: #00B526;
    font-weight: 600;
}

.x-bar .draw-f {
    color: #17a2b8;
    font-weight: 600;
}

.x-bar .lose-f {
    color: #dc3545;
    font-weight: 600;
}

.x-bar .bar {
    display: flex;
    height: 8px;
    border-radius: 2px;
    overflow: hidden;
    background: #e5e5e5;
}

.x-bar .bar span {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    transition: flex 0.3s ease;
    flex-shrink: 0;
}

.x-bar .bar .o-win {
    background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
}

.x-bar .bar .o-draw {
    background: linear-gradient(180deg, #95a5a6 0%, #7f8c8d 100%);
}

.x-bar .bar .o-lose {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
}

/* Average goals bar section */
.x-bar.avg-goals-bar {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.x-bar .tit .explain {
    color: #666;
    font-size: 12px;
    font-weight: 400;
}

/* Labels shown above bar */
.x-bar .tit {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0;
    font-size: 13px;
}

.x-bar .tit span {
    flex: 1;
}

.x-bar .tit span:first-child {
    text-align: left;
}

.x-bar .tit span:nth-child(2) {
    text-align: center;
}

.x-bar .tit span:last-child {
    text-align: right;
}

/* Y-Bar: Vertical bar charts */
.y-bar {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    gap: 15px;
}

.y-bar .group {
    flex: 1;
    text-align: center;
    background: #fff;
    border-radius: 6px;
    padding: 12px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.y-bar .group .tit {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.y-bar .group .tit span {
    color: #888;
    font-weight: 400;
    font-size: 12px;
}

.y-bar .bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 90px;
    gap: 15px;
    padding: 0 10px;
}

.y-bar .bars .item {
    flex: 1;
    max-width: 50px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.y-bar .bars .item .bar {
    width: 100%;
    border-radius: 3px 3px 0 0;
    position: relative;
    transition: height 0.3s ease;
}

/* For 0% bars */
.y-bar .bars .item .bar[style*="height: 2px"] {
    min-height: 2px;
}

.y-bar .bars .item .bar.o-win {
    background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
}

.y-bar .bars .item .bar.o-draw {
    background: linear-gradient(180deg, #95a5a6 0%, #7f8c8d 100%);
}

.y-bar .bars .item .bar.o-lose {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
}

/* Label positioned on top of bar */
.y-bar .bars .item .bar .value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 700;
    text-shadow: none;
    white-space: nowrap;
}

/* Label colors matching bar colors */
.y-bar .bars .item .bar.o-win .value {
    color: #27ae60;
}

.y-bar .bars .item .bar.o-draw .value {
    color: #7f8c8d;
}

.y-bar .bars .item .bar.o-lose .value {
    color: #c0392b;
}

.y-bar .bars .item .txt {
    font-size: 11px;
    color: #666;
    margin-top: 6px;
    font-weight: 500;
}
