/**
 * Public Styles - Gym Reservas Manager PRO
 * Classic Functional High-Contrast UI
 *
 * AISLAMIENTO: Todos los selectores están bajo .gym-reservas-wrapper o,
 * para elementos fixed/portales (modales, toasts), usan clases prefijadas
 * con .gym- sin colisión real con el DOM del theme (z-index elevado + scope
 * de clases propias). Box-sizing, tipografía y normalización de elementos
 * nativos se gestionan internamente sin depender del browser ni del theme.
 */

/* ==========================================================================
   WRAPPER RAÍZ
   ========================================================================== */

.gym-reservas-wrapper {
    /* Tokens de color internos al componente */
    --gym-primary: #2271b1;
    --gym-bg: #f5f5f5;
    --gym-card-bg: #ffffff;
    --gym-border: #cccccc;
    --gym-text-main: #333333;
    --gym-green: #28a745;
    --gym-yellow: #ffc107;
    --gym-red: #dc3545;
    --gym-gray: #6c757d;
    --gym-public-list-status-success: #019719;
    --gym-public-list-status-success-op15: rgba(1, 151, 25, 0.15);
    --gym-public-list-status-warning: #CCA20C;
    --gym-public-list-status-warning-op15: rgba(204, 162, 12, 0.15);
    --gym-public-list-status-danger: #dc3545;
    --gym-public-list-status-danger-op15: rgba(220, 53, 69, 0.15);
    --gym-public-list-status-muted: #6c757d;
    --gym-public-list-status-muted-op15: rgba(108, 117, 125, 0.15);
    --gym-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

    font-family: var(--gym-font);
    color: var(--gym-text-main);
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
    text-align: left;
}

/* Box-model y tipografía garantizados para todos los descendientes */
.gym-reservas-wrapper *,
.gym-reservas-wrapper *::before,
.gym-reservas-wrapper *::after {
    box-sizing: inherit;
    font-family: var(--gym-font);
}

/* Normalización de elementos nativos dentro del wrapper:
   evita dependencia de estilos del navegador o del theme. */

.gym-reservas-wrapper h1,
.gym-reservas-wrapper h2,
.gym-reservas-wrapper h3 {
    margin-top: 0;
    margin-bottom: 0;
    font-weight: bold;
    line-height: 1.3;
    color: var(--gym-text-main);
}

.gym-reservas-wrapper p {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.5;
}

.gym-reservas-wrapper button {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: var(--gym-font);
    font-size: inherit;
    line-height: normal;
    cursor: pointer;
    color: inherit;
    box-sizing: border-box;
}

.gym-reservas-wrapper input,
.gym-reservas-wrapper select,
.gym-reservas-wrapper textarea {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    font-family: var(--gym-font);
    font-size: inherit;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    line-height: normal;
}

/* ==========================================================================
   LAYOUT PRINCIPAL
   ========================================================================== */

/* Hidden by default on Desktop */
.gym-reservas-wrapper .gym-mobile-cal-bar {
    display: none;
}

.gym-reservas-wrapper .gym-public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.gym-reservas-wrapper .gym-public-logo {
    display: flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
}

.gym-reservas-wrapper .gym-logo-inline {
    max-height: 40px;
    max-width: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 4px;
    display: inline-block;
}

/* SVG icono calendario en la barra mobile */
.gym-reservas-wrapper .gym-mob-cal-icon {
    margin-right: 6px;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.gym-reservas-wrapper .gym-card {
    background: var(--gym-card-bg);
    border: none;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
}

.gym-reservas-wrapper .gym-section-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--gym-text-main);
    border-bottom: 2px solid var(--gym-border);
    padding-bottom: 5px;
}

/* ==========================================================================
   CABECERA DEL CALENDARIO
   ========================================================================== */

.gym-reservas-wrapper .gym-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    background: #ffffff;
    padding: 10px;
    border: 1px solid #c6dafc;
    border-radius: 8px
}

.gym-reservas-wrapper .gym-month-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--gym-text-main);
}

.gym-reservas-wrapper .gym-icon-btn {
    background: #F7F9FC;
    border: none;
    width: 30px;
    height: 30px;
    font-weight: bold;
    cursor: pointer;
    color: var(--gym-text-main);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gym-reservas-wrapper .gym-icon-btn:hover {
    background: #e2e6ea;
}

/* ==========================================================================
   GRID DEL CALENDARIO
   ========================================================================== */

.gym-reservas-wrapper .gym-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 20px;
    border: 1px solid var(--gym-border);
    background: var(--gym-border);
}

.gym-reservas-wrapper .gym-cal-dow {
    text-align: center;
    font-size: 0.85rem;
    font-weight: bold;
    background: #F7F9FC;
    padding: 8px 0;
}

.gym-reservas-wrapper .gym-cal-day {
    background: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    color: var(--gym-text-main);
}

.gym-reservas-wrapper .gym-cal-day.empty {
    background: #fdfdfd;
    cursor: default;
}

/* Estados del día — colores sólidos */
.gym-reservas-wrapper .gym-cal-day:not(.empty):hover {
    opacity: 0.8;
}

.gym-reservas-wrapper .gym-cal-day.past {
    background: var(--gym-gray);
    color: #fff;
    cursor: not-allowed;
}

.gym-reservas-wrapper .gym-cal-day.no-classes {
    background: #ffffff;
    color: var(--gym-text-main);
}

.gym-reservas-wrapper .gym-cal-day.available {
    background: var(--gym-green);
    color: #fff;
}

.gym-reservas-wrapper .gym-cal-day.full {
    background: var(--gym-red);
    color: #fff;
}

.gym-reservas-wrapper .gym-cal-day.selected {
    outline: 3px solid var(--gym-primary);
    outline-offset: -3px;
    font-weight: bold;
}

/* ==========================================================================
   FILTRO DE SALAS
   ========================================================================== */

.gym-reservas-wrapper .gym-salas-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #c6dafc;
    border-radius: 8px;
}

.gym-reservas-wrapper .gym-filter-label {
    font-size: 0.9rem;
    font-weight: bold;
    margin: 0;
}

.gym-reservas-wrapper .gym-salas-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.gym-reservas-wrapper .gym-btn-sala {
    background: #e8f0fe;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #2271b1;
    cursor: pointer;
    border-radius: 8px;
}

.gym-reservas-wrapper .gym-btn-sala:hover {
    background: #dde2e6;
}

.gym-reservas-wrapper .gym-btn-sala.active {
    background: var(--gym-primary);
    color: #fff;
    border-color: var(--gym-primary);
}

/* ==========================================================================
   LISTA DE CLASES
   ========================================================================== */

.gym-reservas-wrapper .gym-clases-list {
    display: flex;
    flex-direction: column;
    gap: 8px;

}

.gym-reservas-wrapper #gym-selected-date-label {
    font-weight: normal;
    font-size: 0.9rem;
    color: #666;
    margin-left: 5px;
}

.gym-reservas-wrapper .gym-empty-state {
    text-align: left;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid var(--gym-border);
    margin: 0;
}

.gym-reservas-wrapper .gym-empty-state svg {
    display: none;
}

/* Tarjeta de clase — bloque sólido */
.gym-reservas-wrapper .gym-clase-card {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid transparent;
    background-color: var(--gym-card-bg);
    color: var(--gym-text-main);
    text-align: left;
    border-radius: 8px;
}

.gym-reservas-wrapper .gym-clase-card-accent {
    border-color: var(--gym-sala-color, #c6dafc);
}

.gym-reservas-wrapper .gym-clase-indicator {
    display: none;
}

.gym-reservas-wrapper .gym-clase-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.gym-reservas-wrapper .gym-clase-header {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.gym-reservas-wrapper .gym-clase-title {
    margin: 0;
    font-size: 1.30rem;
    font-weight: 700;
    color: inherit;
}

.gym-reservas-wrapper .gym-clase-time {
    font-weight: 500;
    font-size: 0.9rem;
    color: inherit;
}

.gym-reservas-wrapper .gym-clase-time::before {
    content: "⏰ ";
    margin-right: 4px;
}

.gym-reservas-wrapper .gym-clase-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: inherit;
}

.gym-reservas-wrapper .gym-clase-sala {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.gym-reservas-wrapper .gym-clase-sala::before {
    content: "📍 ";
    margin-right: 4px;
}

.gym-reservas-wrapper .gym-clase-sala svg {
    display: none;
}

.gym-reservas-wrapper .gym-clase-plazas {
    font-weight: bold;
    padding: 4px 10px;
    line-height: 1.2;
    color: var(--gym-public-list-status-color, var(--gym-text-main));
    background-color: rgba(255, 255, 255, 0.35);
    border: 1px solid currentColor;
    border-radius: 999px;
}

/* Estados del listado publico: tintan la caja sin tocar el acento de sala. */
.gym-reservas-wrapper .gym-clase-card.gym-status-available {
    --gym-public-list-status-color: var(--gym-public-list-status-success);
    --gym-public-list-status-bg: var(--gym-public-list-status-success-op15);
    background-color: var(--gym-public-list-status-bg);
    color: var(--gym-public-list-status-color);
}

.gym-reservas-wrapper .gym-clase-card.gym-status-few {
    --gym-public-list-status-color: var(--gym-public-list-status-warning);
    --gym-public-list-status-bg: var(--gym-public-list-status-warning-op15);
    background-color: var(--gym-public-list-status-bg);
    color: var(--gym-public-list-status-color);
}

.gym-reservas-wrapper .gym-clase-card.gym-status-full {
    --gym-public-list-status-color: var(--gym-public-list-status-danger);
    --gym-public-list-status-bg: var(--gym-public-list-status-danger-op15);
    background-color: var(--gym-public-list-status-bg);
    color: var(--gym-public-list-status-color);
}

.gym-reservas-wrapper .gym-clase-card.gym-status-past {
    --gym-public-list-status-color: var(--gym-public-list-status-muted);
    --gym-public-list-status-bg: var(--gym-public-list-status-muted-op15);
    background-color: var(--gym-public-list-status-bg);
    color: var(--gym-public-list-status-color);
}

.gym-reservas-wrapper .gym-clase-card .gym-clase-title,
.gym-reservas-wrapper .gym-clase-card .gym-clase-time,
.gym-reservas-wrapper .gym-clase-card .gym-clase-meta,
.gym-reservas-wrapper .gym-clase-card .gym-clase-sala {
    color: inherit;
}

/* ==========================================================================
   BOTONES GENÉRICOS
   ========================================================================== */

.gym-reservas-wrapper .gym-btn {
    display: inline-block;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
    line-height: normal;
}

.gym-reservas-wrapper .gym-btn-primary {
    background-color: var(--gym-primary);
    color: white;
    border-color: #004085;
}

.gym-reservas-wrapper .gym-btn-primary:hover {
    background-color: #004085;
}

.gym-reservas-wrapper .gym-btn-primary:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
}

.gym-reservas-wrapper .gym-btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.gym-reservas-wrapper .gym-btn-sm:hover {
    background: rgba(0, 0, 0, 0.5);
}

.gym-reservas-wrapper .gym-clase-card .gym-btn-reservar {
    padding: 4px 12px;
    line-height: 1.2;
    color: var(--gym-public-list-status-color, var(--gym-text-main));
    background-color: rgba(255, 255, 255, 0.35);
    border: 1px solid currentColor;
    border-radius: 999px;
    margin-left: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.gym-reservas-wrapper .gym-clase-card .gym-btn-reservar:hover {
    color: var(--gym-public-list-status-color, var(--gym-text-main));
    background-color: rgba(255, 255, 255, 0.6);
    border-color: currentColor;
    transform: translateY(-1px);
}

.gym-reservas-wrapper .gym-btn-full {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
}

/* Botón consultar bonos (en el header del wrapper) */
.gym-reservas-wrapper .gym-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 20px;
    padding: 10px 18px;
    background: #e8f0fe;
    border: none;
    color: #2271b1;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    cursor: pointer;
    vertical-align: middle;
}

.gym-reservas-wrapper .gym-btn-secondary svg {
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #2271b1;
    stroke: currentColor;
    fill: none;
}

.gym-flex {
    display: flex;
}

.gym-flex-center {
    align-items: center;
    justify-content: center;
}

.gym-gap-sm {
    gap: 10px;
}

.gym-text-center {
    text-align: center;
}

.gym-state-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.gym-state-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.gym-state-neutral {
    background: transparent;
    color: inherit;
    border: none;
}

.gym-link-danger {
    color: #d63638;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gym-link-danger:hover {
    color: #b32d2e;
}

.gym-sala-highlight {
    color: #2271b1;
    font-weight: 600;
}

.gym-reservas-modal .gym-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
    line-height: normal;
    border-radius: 8px;
    text-decoration: none;
}

.gym-reservas-modal .gym-btn-primary {
    background-color: var(--gym-primary);
    color: #fff;
    border-color: #004085;
}

.gym-reservas-modal .gym-btn-primary:hover {
    background-color: #004085;
}

.gym-reservas-modal .gym-btn-secondary {
    background: #e8f0fe;
    border: none;
    color: #2271b1;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.gym-reservas-modal .gym-btn-secondary:hover {
    background: #d9e8fb;
}

.gym-btn-danger {
    background-color: #d63638;
    color: #fff;
    border-color: #b32d2e;
}

.gym-btn-danger:hover {
    background-color: #b32d2e;
}

.gym-reservas-modal .gym-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

/* ==========================================================================
   FORMULARIO MODAL
   ========================================================================== */

.gym-reservas-wrapper .gym-reserva-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gym-reservas-wrapper .gym-form-group {
    display: flex;
    flex-direction: column;
}

.gym-reservas-wrapper .gym-form-group label {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--gym-text-main);
}

.gym-reservas-wrapper .gym-form-group label.required::before,
.gym-reservas-wrapper .gym-form-group label[for="reserva_numero"]::before,
.gym-reservas-wrapper .gym-form-group label[for="consulta_numero"]::before {
    content: "*";
    color: #d63638;
    font-weight: 700;
    margin-right: 4px;
}

.gym-reservas-wrapper .gym-form-group input {
    padding: 8px;
    border: 1px solid var(--gym-border);
    font-size: 0.95rem;
    width: 100%;
    background: #fff;
    color: var(--gym-text-main);
    /* Sobrescribe el reset base para este elemento específico */
    appearance: none;
    -webkit-appearance: none;
}

.gym-reservas-wrapper .gym-form-group input:focus {
    border-color: var(--gym-primary);
    outline: none;
}

/* ==========================================================================
   MODALES
   position:fixed — fuera del flujo del wrapper. Clases renombradas al
   prefijo .gym-reservas-modal-* para evitar colisiones con plugins/themes.
   box-sizing y font-family declarados explícitamente (no heredan del wrapper).
   ========================================================================== */

.gym-reservas-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gym-reservas-modal.show {
    display: flex;
}

.gym-reservas-modal *,
.gym-reservas-modal *::before,
.gym-reservas-modal *::after {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gym-reservas-modal-content {
    background: #fff;
    width: 95%;
    max-width: 500px;
    padding: 20px;
    border: 1px solid #999;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#gym-bonos-modal .gym-reservas-modal-content {
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gym-reservas-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
}

.gym-reservas-modal-close:hover {
    color: #000;
}

.gym-reservas-modal-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    color: #333;
}

.gym-reservas-modal-instruction {
    font-size: 0.9rem;
    margin-bottom: 15px;
    margin-top: 0;
    color: #555;
}

.gym-reservas-reserva-info {
    background: #fdfdfd;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    font-size: 0.95em;
    color: #333;
    box-sizing: border-box;
}

.gym-reservas-reserva-meta {
    color: #64748b;
    font-size: 14px;
    display: block;
    margin-top: 4px;
}

.gym-bonos-resultado {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    display: none;
    text-align: center;
    font-weight: 500;
    box-sizing: border-box;
}

.gym-bonos-resultado.is-visible {
    display: block;
}

.gym-bonos-resultado.gym-state-neutral {
    padding: 0;
}

.gym-alert-body {
    text-align: center;
    margin-top: 10px;
    box-sizing: border-box;
}

.gym-bonos-card {
    background: #f8fbff;
    border: 1px solid #d9e8fb;
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
}

.gym-bonos-icon {
    font-size: 34px;
    line-height: 1;
    margin-bottom: 10px;
}

.gym-bonos-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.gym-bonos-value {
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.gym-bonos-value-message {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 400;
}

.gym-bonos-lotes-section {
    margin-top: 14px;
    text-align: left;
}

.gym-bonos-lotes-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #1e293b;
}

.gym-bonos-lotes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gym-bonos-lote-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #e8f0fe;
}

.gym-bonos-lote-main {
    font-size: 14px;
    color: #334155;
}

.gym-bonos-lote-expiry {
    flex: 0 0 auto;
    font-size: 13px;
    color: #64748b;
    text-align: right;
}

.gym-alert-button {
    margin-top: 20px;
    min-width: 120px;
}

.gym-bonos-reservas-section {
    margin-top: 20px;
    text-align: left;
}

.gym-bonos-reservas-title {
    margin: 0 0 10px 0;
    font-size: 15px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
    color: #1e293b;
}

.gym-bonos-reserva-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.gym-bonos-reserva-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gym-bonos-reserva-line {
    font-size: 14px;
    color: #334155;
}

.gym-bonos-reserva-location {
    font-size: 13px;
    color: #64748b;
}

.gym-bonos-reserva-empty {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.gym-socio-public-card {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    text-align: left;
}

.gym-socio-public-card summary {
    cursor: pointer;
    font-weight: 700;
    color: #1e293b;
}

.gym-socio-public-card__body {
    margin-top: 10px;
}

.gym-socio-public-card__body p {
    margin: 6px 0;
    color: #334155;
    font-size: 14px;
}

.gym-reservas-modal-content-sm {
    max-width: 400px;
}

#gym-alert-modal .gym-bonos-icon,
#gym-confirm-cancel-modal .gym-confirm-cancel-icon,
.gym-reservas-toast-warning .gym-reservas-toast-icon {
    color: #ffc107;
}

.gym-reservas-modal-title-compact {
    margin-bottom: 10px;
}

.gym-confirm-cancel-icon {
    font-size: 40px;
}

.gym-confirm-cancel-copy {
    font-size: 15px;
    color: #475569;
    margin-bottom: 20px;
}

.gym-confirm-cancel-actions .gym-btn {
    flex: 1;
}

.gym-reservas-toast-warning .gym-reservas-toast-icon svg {
    stroke: currentColor;
    fill: none;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   position:fixed — fuera del flujo del wrapper. Clases renombradas al
   prefijo .gym-reservas-toast-* para evitar colisiones externas.
   ========================================================================== */

.gym-reservas-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
    width: calc(100vw - 40px);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.gym-reservas-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    font-size: 0.9rem;
    font-weight: bold;
    pointer-events: all;
    border-left: 4px solid transparent;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity .25s ease, transform .25s ease;
    box-sizing: border-box;
}

.gym-reservas-toast.gym-reservas-toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.gym-reservas-toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.gym-reservas-toast-msg {
    flex: 1;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.4;
}

.gym-reservas-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: .5;
    padding: 0 2px;
    transition: opacity .15s;
    box-sizing: border-box;
}

.gym-reservas-toast-close:hover {
    opacity: 1;
}

.gym-reservas-toast-action {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 5px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    color: inherit;
    opacity: .85;
    transition: opacity .15s;
    box-sizing: border-box;
}

.gym-reservas-toast-action:hover {
    opacity: 1;
}

/* Colores por tipo */
.gym-reservas-toast-success {
    background: #f0fdf4;
    color: #166534;
    border-left-color: #22c55e;
}

.gym-reservas-toast-error {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.gym-reservas-toast-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: #f59e0b;
}

.gym-reservas-toast-info {
    background: #eff6ff;
    color: #1e40af;
    border-left-color: #3b82f6;
}

/* ==========================================================================
   RESPONSIVE — Mobile (<= 768px)
   ========================================================================== */

@media (max-width: 768px) {

    #gym-bonos-modal {
        align-items: flex-start;
        padding: calc(16px + env(safe-area-inset-top, 0px)) 12px calc(16px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
    }

    #gym-bonos-modal .gym-reservas-modal-content {
        max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .gym-reservas-toast-container {
        top: calc(70px + env(safe-area-inset-top, 0px));
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }

    .gym-reservas-wrapper .gym-mobile-cal-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--gym-primary);
        color: #fff;
        padding: 10px;
        margin-bottom: 20px;
        border-radius: 4px;
    }

    .gym-reservas-wrapper .gym-mobile-nav-btn {
        background: rgba(0, 0, 0, 0.2);
        color: #fff;
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 4px;
        font-weight: bold;
        font-size: 1.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .gym-reservas-wrapper .gym-mobile-nav-btn:hover {
        background: rgba(0, 0, 0, 0.4);
    }

    .gym-reservas-wrapper .gym-mobile-date-display {
        display: flex;
        align-items: center;
        font-weight: bold;
        font-size: 1.1rem;
        cursor: pointer;
        user-select: none;
        padding: 5px 10px;
        border-radius: 4px;
        transition: background 0.2s;
    }

    .gym-reservas-wrapper .gym-mobile-date-display:hover {
        background: rgba(0, 0, 0, 0.1);
    }

    .gym-reservas-wrapper .gym-mob-chevron {
        transition: transform 0.3s;
        margin-left: 6px;
    }

    /* Calendario mensual colapsable en mobile */
    .gym-reservas-wrapper .gym-monthly-wrapper {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease-out, opacity 0.3s ease-in, margin-bottom 0.4s ease-out;
        margin-bottom: 0;
    }

    .gym-reservas-wrapper .gym-monthly-wrapper.gym-expanded {
        max-height: 1000px;
        opacity: 1;
        margin-bottom: 20px;
    }

    .gym-reservas-wrapper .gym-mobile-cal-bar.gym-expanded .gym-mob-chevron {
        transform: rotate(180deg);
    }

    /* Filtro de salas en mobile */
    .gym-reservas-wrapper .gym-salas-filter {
        flex-direction: column;
        align-items: flex-start;
    }

    .gym-reservas-wrapper .gym-filter-label {
        width: 100%;
        margin-bottom: 5px;
    }

    .gym-reservas-wrapper .gym-salas-buttons {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .gym-reservas-wrapper .gym-btn-sala {
        flex: 1 1 auto;
        text-align: center;
        min-width: 90px;
        padding: 10px 12px;
    }

    /* Layout de clase en mobile */
    .gym-reservas-wrapper .gym-clase-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .gym-reservas-wrapper .gym-btn-sm {
        margin-top: 10px;
        width: 100%;
    }

    .gym-reservas-wrapper .gym-clase-card .gym-btn-reservar {
        margin-left: 0;
    }

    .gym-reservas-wrapper .gym-clase-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px;
    }

    .gym-reservas-wrapper .gym-clase-title {
        text-align: center;
        width: 100%;
    }

    .gym-bonos-reserva-item {
        flex-direction: column;
        align-items: flex-start;
    }

}

body {
    background: #F7F9FC;
}

.gym-bonos-ofertas-section {
    margin: 16px 0;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.gym-bonos-ofertas-title {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.3;
    color: #1f2937;
}

.gym-bonos-ofertas-list {
    display: grid;
    gap: 12px;
}

.gym-bonos-oferta-card {
    padding: 14px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
}

.gym-bonos-oferta-promo {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.gym-bonos-oferta-title {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.3;
    color: #111827;
}

.gym-bonos-oferta-description,
.gym-bonos-oferta-items {
    margin: 0 0 8px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.45;
}

.gym-bonos-oferta-price {
    margin: 10px 0;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
}
