/* ==========================================================================
   Juventus Match Widgets & Calendar Styling
   ========================================================================== */

/* 1. Hublot / Match Bar Enhancements */
.jcom-hc [data-app="HublotCalendar"] .jcom-hc {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    font-family: "Roboto Condensed", sans-serif;
}

@media (min-width: 1024px) {
    .jcom-hc [data-app="HublotCalendar"] .jcom-hc {
        flex-direction: row;
        align-items: stretch;
    }
}

.jcom-hc-postmatches-container,
.jcom-hc-prematches-container {
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.jcom-hc-postmatches-container:hover {
    background-color: #081f3d !important;
}

.jcom-hc-prematches-container:hover {
    background-color: #1b3a66 !important;
}

.jcom-hc-match__title {
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #999;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jcom-hc-match__title .badge-status {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-status.badge-ft {
    background-color: #294b7a;
    color: #fff;
}

.badge-status.badge-next {
    background-color: #00c6ff;
    color:#0b2d61;
}

.hublot-team__crest {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
}

.hublot-team-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.hublot-team-container .team-name-wrap {
    display: flex;
    align-items: center;
}

/* Hublot Countdown Timer Box */
.jcom-hc .hublot-component__container {
    border-top: 2px solid #00c6ff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.hublot-component__remaintime-block span:first-child {
    font-family: "Roboto Condensed", monospace;
    font-variant-numeric: tabular-nums;
}

/* 2. Hero Showcase Match Card */
.jcom-c-match-info {
    position: absolute;
    left: 20px;
    bottom: 30px;
    z-index: 10;
    max-width: 440px;
    color: #fff;
    font-family: "Roboto Condensed", sans-serif;
}

@media (min-width: 768px) {
    .jcom-c-match-info {
        left: 40px;
        bottom: 50px;
    }
}

.jcom-c-match-teams-wrapper {
    margin: 15px 0 20px 0;
}

.jcom-c-match-teams--logos {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.jcom-c-match-teams__logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.jcom-c-match-teams__name {
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
    color: #fff;
}

.jcom-c-match-teams__name.is-juventus {
    color: #fff;
}

.jcom-c-match-info__competition img {
    height: 48px;
    width: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

.jcom-c-match-info__text {
    font-size: 14px;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.jcom-c-match-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 3. Fixtures & Results Schedule Component */
.juve-fixtures-widget {
    width: 100%;
    margin: 40px 0;
    font-family: "Roboto Condensed", sans-serif;
}

.juve-fixtures-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.juve-fixtures-tabs {
    display: flex;
    gap: 10px;
}

.juve-tab-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #777;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.juve-tab-btn:hover {
    color: #061a33;
}

.juve-tab-btn.active {
    color: #061a33;
    border-bottom-color: #00c6ff;
}

.juve-fixtures-filter select {
    padding: 8px 16px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
}

.juve-fixtures-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.juve-match-row {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px 24px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.juve-match-row:hover {
    border-color: #061a33;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.juve-match-row__meta {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid #eee;
    padding-right: 16px;
}

.juve-match-row__comp {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #555;
}

.juve-match-row__comp img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.juve-match-row__date {
    font-size: 14px;
    color: #081f3d;
    font-weight: 600;
}

.juve-match-row__venue {
    font-size: 12px;
    color: #888;
}

.juve-match-row__teams {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    gap: 20px;
}

.juve-match-team {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.juve-match-team.team-home {
    justify-content: flex-end;
    text-align: right;
}

.juve-match-team.team-away {
    justify-content: flex-start;
    text-align: left;
}

.juve-match-team__name {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #081f3d;
}

.juve-match-team__name.is-juve {
    color: #061a33;
    font-weight: 800;
}

.juve-match-team__crest {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.juve-match-scorebox {
    flex: 0 0 120px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.juve-match-score {
    font-size: 28px;
    font-weight: 800;
    color: #061a33;
    letter-spacing: 4px;
    line-height: 1;
}

.juve-match-score.score-played {
    color: #00c6ff;
}

.juve-match-time {
    font-size: 18px;
    font-weight: 700;
    color: #081f3d;
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 4px;
}

.juve-match-badge {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #888;
    margin-top: 4px;
}

.juve-match-row__actions {
    flex: 0 0 150px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.juve-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.juve-btn-primary {
    background: #061a33;
    color: #fff;
    border: 1px solid #061a33;
}

.juve-btn-primary:hover {
    background: #00c6ff;
    border-color: #00c6ff;
    color:#0b2d61;
}

.juve-btn-outline {
    background: transparent;
    color: #061a33;
    border: 1px solid #ccc;
}

.juve-btn-outline:hover {
    border-color: #061a33;
    color: #061a33;
}

/* 4. Match Header Styling for match-detail.html */
.juve-match-header {
    background: linear-gradient(180deg, #081f3d 0%, #163053 100%);
    color: #fff;
    padding: 40px 20px;
    font-family: "Roboto Condensed", sans-serif;
    border-bottom: 3px solid #00c6ff;
}

.juve-match-header__comp-row {
    text-align: center;
    margin-bottom: 25px;
}

.juve-match-header__comp-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #ddd;
}

.juve-match-header__comp-badge img {
    height: 20px;
    width: auto;
}

.juve-match-header__battle {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    gap: 30px;
}

.juve-header-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.juve-header-team.team-home {
    justify-content: flex-end;
    text-align: right;
}

.juve-header-team.team-away {
    justify-content: flex-start;
    text-align: left;
}

.juve-header-team__crest {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.juve-header-team__title {
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.1;
}

.juve-header-scorers {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #aaa;
    font-weight: 400;
}

.juve-header-scorebox {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.juve-header-score {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 6px;
    line-height: 1;
    color: #fff;
}

.juve-header-status {
    background: #00c6ff;
    color:#0b2d61;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 3px;
    margin-top: 8px;
}

.juve-header-subinfo {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 5. Lineups Pitch Styling */
.juve-lineups-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-family: "Roboto Condensed", sans-serif;
}

.juve-pitch {
    background: #237a38 radial-gradient(circle, #2d9446 20%, #1f6b31 80%);
    border: 3px solid #fff;
    border-radius: 12px;
    padding: 30px 20px;
    position: relative;
    max-width: 750px;
    margin: 0 auto;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.juve-pitch::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255,255,255,0.7);
    transform: translateY(-50%);
}

.juve-pitch-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110px;
    height: 110px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.juve-pitch-line {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    z-index: 2;
}

.juve-pitch-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.juve-pitch-player:hover {
    transform: scale(1.1);
}

.juve-jersey-num {
    width: 38px;
    height: 38px;
    background: #061a33;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}

.juve-jersey-num.away-num {
    background: #fff;
    color: #061a33;
    border-color: #061a33;
}

.juve-player-name {
    margin-top: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.5);
    padding: 2px 8px;
    border-radius: 3px;
}

.juve-subs-bench {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.juve-subs-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #1b3a66;
}

.juve-subs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.juve-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f8f8;
    padding: 8px 12px;
    border-radius: 4px;
}

.juve-sub-num {
    font-weight: 800;
    font-size: 14px;
    color: #666;
    min-width: 20px;
}

.juve-sub-name {
    font-size: 14px;
    font-weight: 600;
    color: #081f3d;
}

.juve-sub-pos {
    font-size: 11px;
    color: #888;
    margin-left: auto;
    text-transform: uppercase;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .juve-match-row {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    .juve-match-row__meta {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 10px;
    }
    .juve-match-row__teams {
        padding: 0;
    }
    .juve-match-team__name {
        font-size: 16px;
    }
    .juve-match-row__actions {
        justify-content: center;
    }
    .juve-header-battle {
        flex-direction: column;
        gap: 20px;
    }
    .juve-header-team.team-home,
    .juve-header-team.team-away {
        justify-content: center;
        text-align: center;
    }
}
