/* /global/css/resultados.css */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: #f3f4f6;
    color: #111827;
}

button {
    font-family: 'Montserrat', sans-serif;
}

.resTop {
    color: #e5e7eb;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.resTop__inner {
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.header_logo {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.resTop__brand {
    display: flex;
    align-items: center;
    width: 100vw;
    justify-content: space-between;
    color: #0D4C89;
}

.resTop__title {
    font-weight: 900;
}

.resTop__sub {
    font-size: 18px;
    text-transform: uppercase;
    font-weight: 600;
}

.resTop__controls {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 20px auto;
    background: #fff;
    max-width: 1100px;
    padding: 20px;
    border-radius: 8px;
}

#resFecha,
#resBuscar {
    border-radius: 8px;
    border: 1px solid rgb(0 0 0 / 18%);
    background: rgba(255, 255, 255, .06);
    color: #e5e7eb;
    padding: 8px 12px;
    outline: none;
}

#resBuscar {
    min-width: 260px;
}

#resFecha option {
    color: #111827;
}

.resMain {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
}

.resTabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.resTab {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
    font-size: 12px;
    cursor: pointer;
}

.resTab.is-active {
    border-color: rgba(59, 130, 246, .45);
    background: rgba(59, 130, 246, .10);
    color: #1e40af;
}

.resStatus {
    font-size: 14px;
    color: #0D4C89;
    margin-bottom: 12px;
}

.resList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.resCard {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 0 8px rgba(15, 23, 42, .15);
}

.resTime {
    font-weight: 700;
    font-size: 18px;
    color: #0D4C89;
}

.resMeta {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.resTag {
    font-size: 12px;
    font-weight: 600;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 4px 8px;
    border-radius: 6px;
    color: #0D4C89;
    background-color: rgba(91, 193, 233, 0.25);

}

.resCard__mid {
    flex: 1;
    text-align: center;
}

.logo_altamira_games {
    width: auto;
    height: 50px;
}

.resScore {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    font-size: 18px;
    margin: 6px 0;
}

.resVS {
    opacity: .6;
}

.resVsOnly {
    font-weight: 900;
    color: #6b7280;
    margin: 6px 0;
}

.resState {
    font-size: 12px;
    font-weight: 900;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
}

.resState.live {
    border-color: rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .12);
    color: #166534;
}

.resEmpty {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    color: #6b7280;
}

@media (max-width: 500px) {
    .resPop__team {
        flex-direction:column;
        height:100px;
    }
    #resPop_team_invert {
        flex-direction:column-reverse;
    }
}

@media (max-width: 650px) {
    .resCard {
        flex-direction: column;
        align-items:center;
        justify-content:center;
    }

    .resTime {
        text-align:center;
    }

    .resCard__left {
        min-width: auto;
    }

    .resCard__mid {
        text-align: left;
    }

    .resScore {
        justify-content: flex-start;
    }

    .resTeam--left,
    .resTeam--right {
        text-align: center !important;
    }

    .resTop__controls, .dayBtns {
        flex-direction:column;
    }
}

@media (max-width:740px) {
    .resMainRow {
        flex-direction: column;
    }


}

.dayBtns {
    display: flex;
    gap: 8px;
   
}

.dayBtn {
    border: 1px solid #0D4C89;
    color: #0D4C89;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background-color: rgba(91, 193, 233, 0.25);
    transition: all 0.25s ease-in-out;
}

.dayBtn.is-active {
    border-color: #0D4C89;
    background: #0D4C89;
    color: #ffffff;
}

.dayBtn:hover {
    border-color: #0D4C89;
    background: #0D4C89;
    color: #ffffff;
}

.acc {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accItem {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.accBtn {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
}

.accCount {
    margin-left: auto;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(91, 193, 233, 0.25);
    background: rgba(91, 193, 233, 0.125);
    color: #0D4C89;
}

.accCaret {
    transition: transform 180ms ease;
}

.accPanel {
    display: none;
    padding: 18px;
}

.accItem.is-open .accPanel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accItem.is-open .accCaret {
    transform: rotate(180deg);
}

.sportFilter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sportFilter__group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.sportFilter__label {
    font-weight: 600;
    font-size: 14px;
    color: #0D4C89;
    opacity: .95;
}

.sportFilter__btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sportBtn {
    border: 1px solid #5BC0E8;
    background: #ffffff;
    color: #5BC0E8;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

.sportBtn.is-active {
    border-color: #0D4C89;
    background: #0D4C89;
    color: #ffffff;
}

.setCtrl {
    margin: 10px 0 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.setCtrl__select {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-weight: 800;
}

.setCtrl__btn {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #111827;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.setCtrl__hint {
    font-size: 12px;
    color: #6b7280;
}

.resVolley {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.resSetNow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.resSetLabel {
    font-weight: 900;
    font-size: 12px;
    color: #6b7280;
}

.resSetScore {
    font-weight: 1000;
    font-size: 14px;
    color: #111827;
}

.resSets {
    width: 100%;
    margin-top: 6px;
    border-top: 1px dashed #e5e7eb;
    padding-top: 8px;
}

.resSets summary {
    cursor: pointer;
    font-weight: 900;
    font-size: 12px;
    color: #111827;
    list-style: none;
    text-align: center;
}

.resSets summary::-webkit-details-marker {
    display: none;
}

.resSets__list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.resSetRow {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.resSetRow__n {
    font-weight: 900;
    color: #111827;
}

.resSetRow__s {
    font-weight: 900;
    color: #111827;
}

.resRow {
    display: flex;
    align-items: center;
    gap: 10px;
}

.resScoreNum {
    width: 48px;
    font-weight: 700;
    font-size: 18px;
    padding: 14px 20px;
    background-color: #0D4C89;
    color: #ffffff;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}

.resVsBlock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 90px;
}

.resMainRow {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.resSetsRow {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

.resTeam {
    font-weight: 600;
    font-size: 16px;
}

.resTeam--left {

    text-align: right;
}

.resTeam--right {

    text-align: left;
}


.resVsOnly {
    font-weight: 700;
    font-size: 12px;
    color: #0D4C89;
}

.resItem {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resSetsWrap {
    display: flex;
    justify-content: center;
}

.resPop__btn {
    border: 2px solid #0D4C89;
    background: #fff;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #0D4C89;
}

.resPop__panel {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .55);
}

.resPop__panel[hidden] {
    display: none !important;
}

.resPop__box {
    width: min(620px, 92vw);
    max-height: 85vh;
    overflow: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .22);
    padding: 20px;
    position: relative;
}

.resPop__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.resPop__title {
    font-weight: 700;
    margin-bottom: 24px;
    font-size:14px;
}

.resPop__teams {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 10px;
    justify-content: center;
}

.resPop__team {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.resPop__name {
    font-weight: 600;
    font-size: 14px;
    color: #000;
    text-align: center;
    width:100px;
}

.resPop__score {
    font-weight: 1100;
    font-size: 18px;
    color: #111827;
}

.resPop__vs {
    font-weight: 600;
    color: #111827;
    margin: auto 0;
}

.resPop__sets {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px dashed #e5e7eb;
    padding-top: 10px;
}

.resPop__setRow {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.resPop__setN {
    font-weight: 600;
}

.resPop__setS {
    font-weight: 600;
    display: flex;
    gap: 16px;
    align-items: center;
}

.num-popup1, .num-popup2 {
    font-size: 16px;
    padding: 10px 14px;
    background: rgba(91, 193, 233, 0.25);
    color: #0D4C89;
    border-radius: 6px;
}

.resPop__empty {
    font-size: 12px;
    color: #6b7280;
}

/* Flip vertical cuando cambia el marcador */
.resCard__mid,
.resMainRow{
  perspective: 800px;
}


.resScoreNum{
  display:inline-block;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  will-change: transform;
}

.resScoreNum.is-flip{
  animation: scoreFlipY 320ms ease;
}

@keyframes scoreFlipY{
  0%   { transform: rotateX(0deg); }
  40%  { transform: rotateX(90deg); }
  60%  { transform: rotateX(-25deg); }
  100% { transform: rotateX(0deg); }
}

/* Elementos animables (cards + popup) */
/* Elementos animables (cards + popup) */
[data-flip-key]{
  display:inline-block;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}

[data-flip-key].is-flip{
  animation: scoreFlipX 360ms ease;
}

/* Flip X */
@keyframes scoreFlipX{
  0%   { transform: rotateX(0deg); }
  40%  { transform: rotateX(90deg); }
  60%  { transform: rotateX(-20deg); }
  100% { transform: rotateX(0deg); }
}

/* perspectiva dentro del popup */
.resPop__box{
  perspective: 800px;
}

.resScorePill{
  width: 48px;
  padding: 10px 0;
  background:#0D4C89;
  color:#fff;
  border-radius: 6px;
  text-align:center;
  font-weight:700;
}