/* =========================================================================
   Sovereign Mobile Bottom Sheets (Vanilla CSS & Fluid Drag Physics)
   Designed for Experiencia de Barrio Nivel Dios — 1-Handed Couch Ergonomics
   ========================================================================= */

.bottom-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 14, 10, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-sheet-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9995;
    background: linear-gradient(180deg, #132b20 0%, #0a1b13 100%);
    border-top: 1.5px solid #3b6b52;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f7f5eb;
    touch-action: pan-y;
}

.bottom-sheet-backdrop.is-open .bottom-sheet {
    transform: translate3d(0, 0, 0);
}

.bottom-sheet-handle-wrap {
    padding: 10px 16px 6px;
    display: flex;
    justify-content: center;
    cursor: grab;
    touch-action: none;
}

.bottom-sheet-handle {
    width: 48px;
    height: 5px;
    border-radius: 9999px;
    background: #477059;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bottom-sheet-title {
    font-family: var(--display, sans-serif);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffd875;
    margin: 0;
    letter-spacing: -0.01em;
}

.bottom-sheet-close {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e5ece6;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s ease;
}

.bottom-sheet-close:active {
    background: rgba(255, 255, 255, 0.16);
}

.bottom-sheet-content {
    padding: 14px 18px calc(24px + env(safe-area-inset-bottom, 16px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}

/* Sheets specific styling */
.sheet-jornadas-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sheet-jornada-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: #f7f5eb;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sheet-jornada-item:active,
.sheet-jornada-item.is-selected {
    background: rgba(243, 201, 107, 0.14);
    border-color: #f3c96b;
}

.sheet-jornada-info strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 750;
    color: #fff9e8;
}

.sheet-jornada-info small {
    font-size: 0.78rem;
    color: #a4beae;
}

.sheet-jornada-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sheet-jornada-badge.is-open {
    background: #194f31;
    color: #a7f3d0;
}

.sheet-jornada-badge.is-locked {
    background: #443716;
    color: #fef08a;
}

.sheet-jornada-badge.is-scored {
    background: #1f3b58;
    color: #bae6fd;
}

/* Choices Sheet ("Quién eligió qué") */
.sheet-choices-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sheet-match-header {
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sheet-match-teams {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.sheet-match-score {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffd875;
    font-family: var(--display, sans-serif);
}

.sheet-choices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sheet-choice-col {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sheet-choice-col.is-winner {
    background: rgba(243, 201, 107, 0.15);
    border-color: #f3c96b;
}

.sheet-choice-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-align: center;
    color: #e2e8f0;
    margin-bottom: 4px;
}

.sheet-choice-pill {
    background: rgba(255, 255, 255, 0.06);
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    text-align: center;
    color: #cad8ce;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sheet-choice-pill.is-self {
    background: #1b8a43;
    color: #fff;
    font-weight: 750;
}

/* Carrilla Sheet Styling */
.carrilla-sheet-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.carrilla-sheet-subtitle {
    font-size: 0.88rem;
    color: #a4beae;
    margin: 0 0 6px;
    font-weight: 600;
}

.carrilla-sheet-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.carrilla-sheet-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 14px 16px;
    border-radius: 14px;
    min-height: 58px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.carrilla-sheet-btn:active {
    transform: scale(0.98);
}

.carrilla-sheet-btn span {
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.2;
}

.carrilla-sheet-btn small {
    font-size: 0.78rem;
    opacity: 0.85;
    margin-top: 2px;
}
