/* Estilos compartidos por las páginas públicas (academia y clase). Las
   clases .pub-* viven acá para que ambas páginas se vean iguales. Estilos
   específicos de cada página van en su propio bloque page_css. */

/* Móvil: reducir el padding lateral del contenedor para aprovechar el ancho
   (las tarjetas quedan casi a borde de pantalla). Scoped a la página pública. */
@media (max-width: 767.98px) {
    .app-academy .container-xxl {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ---- Paleta: página sobre gris suave, contenido en tarjetas blancas,
   acentos con el color de marca de la academia (--brand). ---- */
.pub-page { background: #f5f6fa; }
.pub-main-card {
    border: 1px solid #e9ecf3;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(35, 45, 80, 0.05);
}
.pub-main-card > .card-body { padding: 1.5rem; }
@media (max-width: 767.98px) {
    .pub-main-card > .card-body { padding: 1rem; }
}

/* ---- Banner promocional ---- */
.pub-promo-bar {
    background: #fff3cd;
    color: #664d03;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 2.5rem;
    position: relative;
}
.pub-promo-bar .pub-promo-close {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
}

/* ---- Bloque de identidad + descripción "ver más" ---- */
.pub-identity h1 { font-weight: 600; margin-bottom: 0.25rem; }
@media (min-width: 768px) { .pub-identity h1 { font-size: 1.75rem; } }
/* En <a> el ícono se alinea por baseline y queda desplazado; forzamos el
   centrado real (igual que en el <button> de compartir). */
.pub-id-icon { display: inline-flex; align-items: center; justify-content: center; }
.pub-id-icon > i { line-height: 1; }
.pub-identity-logo {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
}
.pub-desc {
    color: #4a5568;
    margin-bottom: 0.25rem;
    white-space: pre-line;
}
.pub-desc.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pub-desc-toggle { font-weight: 600; color: var(--brand, #6D28D9); }

/* ---- Tabs Información / Horarios (el contenido carga justo abajo) ---- */
.pub-anchors {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
}
.pub-tab {
    background: none;
    border: none;
    padding: 0.6rem 0;
    font-weight: 600;
    color: #697a8d;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.pub-tab:hover { color: #2d3748; }
.pub-tab.active {
    color: var(--brand, #6D28D9);
    border-bottom-color: var(--brand, #6D28D9);
}

/* ---- Horarios: day-nav + filas diarias ---- */
.pub-day-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
    margin-bottom: 0.25rem;
}
.pub-day-nav .pub-day-label {
    font-weight: 700;
    min-width: 150px;
    text-align: center;
}
.pub-day-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.pub-day-time {
    width: 64px;
    flex-shrink: 0;
    line-height: 1.2;
}
.pub-day-time .pub-day-hour { font-weight: 700; color: var(--brand, #6D28D9); }
.pub-day-time small { font-size: 0.75rem; }
.pub-day-row {
    border-radius: 8px;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    transition: background 0.12s ease;
}
.pub-day-row:hover { background: #f6f7fb; }
.pub-day-meta { flex: 1; min-width: 0; }
.pub-day-name { font-weight: 600; color: #2d3748; }
.pub-day-sub { color: #697a8d; font-size: 0.85rem; }
.pub-day-cta { flex-shrink: 0; }
.pub-day-row.is-past { opacity: 0.55; }
.pub-day-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Los temas oscuros pisan --pub-loading-bg (si no, el velo blanco hace un
       flash claro sobre la página oscura mientras carga el día). */
    background: var(--pub-loading-bg, rgba(255, 255, 255, 0.7));
    z-index: 5;
    border-radius: 8px;
}

/* ---- Secciones informativas ---- */
.pub-info-section h4 {
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--brand, #6D28D9);
    padding-left: 0.6rem;
}
.pub-info-section p { color: #4a5568; white-space: pre-line; }

/* Reserva/anulación multi-asistente del modal público. Compartido por academia
   y clase, clásico y temas. Chips compactos; el estado seleccionado se ve con el
   checkbox (sin resaltar el borde, se veía raro). */
.pub-att-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pub-att-chip {
    display: inline-flex; align-items: center; gap: 0.45rem; margin: 0;
    min-height: 38px;
    border: 1px solid #e0e3e7; border-radius: 8px; padding: 0.35rem 0.7rem;
    cursor: pointer; font-size: 0.8rem; line-height: 1.2; user-select: none;
}
.pub-att-chip input { margin: 0; width: 1rem; height: 1rem; flex-shrink: 0; }
.pub-att-chip.is-booked { opacity: 0.55; cursor: not-allowed; }
.pub-att-chip .pub-att-tag { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.5px; color: #a1acb8; }
.pub-att-chip .pub-att-plan { font-size: 0.7rem; color: #8592a3; }

/* Fila de acciones del modal (Anular / Reservar otro) lado a lado. */
.pub-modal-actions { display: flex; gap: 0.5rem; }
.pub-modal-actions .btn { flex: 1 1 0; min-width: 0; }

/* Modal público compacto en móvil (textos/botones no tan grandes). */
@media (max-width: 576px) {
    #pubBookBody { font-size: 0.85rem; }
    #pubBookBody .btn { padding: 0.45rem 0.6rem; font-size: 0.85rem; }
    #pubBookBody .form-select { font-size: 0.85rem; }
}

/* Título del modal: que envuelva si el nombre de la clase es largo, en vez de
   cortarse/desbordar bajo el botón cerrar. */
#pubBookModal .modal-header { align-items: flex-start; }
#pubBookTitle { word-break: break-word; overflow-wrap: anywhere; line-height: 1.3; margin: 0; }

/* "Reservada" clickeable (abre el modal para gestionar/anular). */
.js-pub-booked { cursor: pointer; font: inherit; }
.js-pub-booked:hover { filter: brightness(0.95); }

/* Breadcrumb de las páginas públicas (academia > sección). Compartido: lo usan
   la página de una clase y la de eventos de la academia. */
.pub-breadcrumb {
    font-size: 0.85rem;
    color: #697a8d;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0.75rem 0 0;
}
.pub-breadcrumb a { color: var(--brand, #6D28D9); text-decoration: none; }
.pub-breadcrumb a:hover { text-decoration: underline; }
.pub-breadcrumb .sep { color: #cbd2e0; }
.pub-breadcrumb .current { color: #2d3748; font-weight: 600; }
