/* ==========================================================================
   TennisShop Core v2 — widgets.css
   Línea gráfica para widgets Elementor del Core (planes, bookings, envíos).
   ========================================================================== */

.elementor-widget-tsg_my_bookings,
.elementor-widget-tsg_member_plans,
.elementor-widget-tsg_send_plan,
.elementor-widget-tsg_sent_instructions {
    --tsg-blue: #001489;
    --tsg-blue-dark: #000d5c;
    --tsg-orange: #e66415;
    --tsg-orange-lt: #ff7a2d;
    --tsg-ink: #141414;
    --tsg-muted: #64748b;
    --tsg-subtle: #94a3b8;
    --tsg-border: #e5e7eb;
    --tsg-surface: #ffffff;
    --tsg-success: #22c55e;
    --tsg-font-display: "Barlow Condensed","Futura Extra Black Condensed","Oswald",Impact,sans-serif;
    --tsg-font-body: "Montserrat","Gotham",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}

.tsg-empty,
.tsg-my-classes-empty {
    color: var(--tsg-muted);
    padding: 28px 24px;
    text-align: center;
    background: var(--tsg-surface);
    border-radius: 16px;
    font-family: var(--tsg-font-body);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(0,20,137,.05);
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.tsg-my-classes-empty i { color: var(--tsg-orange); font-size: 18px; }

/* ─── My Bookings v2: card moderna y compacta ────────────────────────────── */
.tsg-my-classes {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 16px !important;
    font-family: var(--tsg-font-body);
    margin: 0;
    padding: 0;
    list-style: none;
}

.tsg-my-class {
    position: relative;
    background: var(--tsg-surface);
    border-radius: 16px;
    padding: 16px 18px 48px; /* extra bottom para el icono trash */
    box-shadow: 0 4px 14px rgba(15,23,42,.06);
    overflow: hidden;
    isolation: isolate;
    border: 1px solid transparent;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 210px;
    font-family: var(--tsg-font-body);
}
.tsg-my-class::before,
.tsg-my-class::after { content: none !important; }
.tsg-my-class:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(15,23,42,.12);
    border-color: rgba(0,20,137,.08);
}

.tsg-my-class__bg {
    position: absolute;
    right: -10px; bottom: -18px;
    font-size: 110px;
    color: var(--tsg-orange);
    opacity: .07;
    z-index: 0;
    transform: rotate(-8deg);
    pointer-events: none;
    line-height: 1;
}

.tsg-my-class__head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    position: relative; z-index: 1;
    margin-bottom: 4px;
}
.tsg-my-class__day {
    font-family: var(--tsg-font-body) !important;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--tsg-orange);
    margin: 0;
}

.tsg-my-class__badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    line-height: 1;
    font-family: var(--tsg-font-body);
}
.tsg-my-class__badge--next { background: rgba(0,20,137,.10); color: var(--tsg-blue); }
.tsg-my-class__badge--done { background: rgba(100,116,139,.16); color: var(--tsg-muted); }
.tsg-my-class__badge--live {
    background: var(--tsg-orange);
    color: #fff;
    animation: tsg-pulse-live 1.4s ease-in-out infinite;
}
.tsg-my-class__badge--live span {
    width: 6px; height: 6px; border-radius: 50%;
    background: #fff;
}
@keyframes tsg-pulse-live { 0%,100% { opacity: 1; } 50% { opacity: .85; transform: scale(1.04); } }

.tsg-my-class__title {
    margin: 2px 0 2px !important;
    font-family: var(--tsg-font-display) !important;
    font-style: italic !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    color: var(--tsg-blue) !important;
    font-size: 18px !important;
    line-height: 1 !important;
    letter-spacing: -0.3px !important;
    position: relative; z-index: 1;
    padding: 0;
}
.tsg-my-class__discipline {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--tsg-orange);
    position: relative; z-index: 1;
    margin-bottom: 4px;
}

.tsg-my-class__meta {
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 0 !important;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: var(--tsg-muted);
    position: relative; z-index: 1;
}
.tsg-my-class__meta li {
    display: flex !important;
    align-items: center;
    gap: 8px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.tsg-my-class__meta li::marker { content: none !important; }
.tsg-my-class__meta i {
    color: var(--tsg-blue);
    font-size: 11px;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

/* Estados de la card en "Mis clases de interés":
   - in_progress: borde naranja vivo, EN CURSO destacado
   - today: borde naranja sutil — la clase es hoy
   - tomorrow: acento azul — es mañana
   - upcoming: estilo neutro (semana actual otro día, o próxima semana)
   Las clases NUNCA se grisean aquí porque son ocurrencias recurrentes; siempre hay
   una próxima fecha. */
.tsg-my-class.tsg-my-class--in_progress {
    border: 2px solid var(--tsg-orange);
    box-shadow: 0 10px 28px rgba(230,100,21,.2);
}
.tsg-my-class.tsg-my-class--in_progress .tsg-my-class__day {
    color: var(--tsg-orange);
    font-weight: 900;
    animation: tsg-pulse-live 1.4s ease-in-out infinite;
}
.tsg-my-class.tsg-my-class--today {
    border: 1px solid rgba(230,100,21,.35);
    box-shadow: 0 6px 18px rgba(230,100,21,.10);
}
.tsg-my-class.tsg-my-class--today .tsg-my-class__day {
    color: var(--tsg-orange);
    font-weight: 900;
}
.tsg-my-class.tsg-my-class--tomorrow .tsg-my-class__day {
    color: var(--tsg-blue);
    font-weight: 800;
}
.tsg-my-class.tsg-my-class--upcoming .tsg-my-class__day {
    color: var(--tsg-muted);
}

/* ─── Botón "papelera" para quitar de mis clases — esquina inferior derecha ── */
.tsg-my-class__remove {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(15,23,42,.04);
    color: var(--tsg-muted);
    cursor: pointer;
    z-index: 5;
    transition: background .15s ease, color .15s ease, transform .15s ease;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: .65;
}
.tsg-my-class__remove i {
    font-size: 14px;
    line-height: 1;
}
.tsg-my-class:hover .tsg-my-class__remove {
    opacity: 1;
}
.tsg-my-class__remove:hover {
    background: rgba(220,38,38,.12);
    color: var(--tsg-danger);
    transform: scale(1.1);
    opacity: 1;
}
.tsg-my-class.is-confirming .tsg-my-class__remove { opacity: 0; pointer-events: none; }

/* ─── Panel de confirmación inline ──────────────────────────────────────── */
.tsg-my-class__confirm {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(4px);
    border-radius: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 22px;
    text-align: center;
    z-index: 6;
    animation: tsg-confirm-in .2s ease;
}
.tsg-my-class__confirm[hidden] { display: none; }
@keyframes tsg-confirm-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

.tsg-my-class__confirm i {
    color: var(--tsg-danger);
    font-size: 28px;
}
.tsg-my-class__confirm p {
    margin: 0;
    font-family: var(--tsg-font-body) !important;
    font-size: 14px;
    font-weight: 600;
    color: var(--tsg-ink);
    line-height: 1.4;
}
.tsg-my-class__confirm-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    justify-content: center;
}
.tsg-my-class__confirm-actions button {
    flex: 1;
    max-width: 130px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 2px solid transparent;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease;
    font-family: var(--tsg-font-body);
    line-height: 1;
}
.tsg-my-class__confirm-no {
    background: #fff;
    color: var(--tsg-blue);
    border-color: var(--tsg-blue);
}
.tsg-my-class__confirm-no:hover {
    background: var(--tsg-blue);
    color: #fff;
}
.tsg-my-class__confirm-yes {
    background: var(--tsg-danger);
    color: #fff;
    border-color: var(--tsg-danger);
}
.tsg-my-class__confirm-yes:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
}
.tsg-my-class__confirm-yes:disabled {
    background: #e2e8f0 !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed;
    transform: none !important;
}
.tsg-my-class__error {
    color: var(--tsg-danger);
    font-size: 11px;
    margin: 6px 0 0;
    font-weight: 600;
}

/* ─── Legacy compat: lista plana (si algún tema viejo aún usa <ul.tsg-my-attendance>) ─── */
.tsg-my-attendance {
    list-style: none; padding: 0; margin: 0;
    display: grid; gap: 10px;
    font-family: var(--tsg-font-body);
}
.tsg-my-attendance li {
    background: var(--tsg-surface);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 4px 12px rgba(0,20,137,.06);
    transition: transform .15s ease;
}
.tsg-my-attendance li:hover { transform: translateX(3px); }
.tsg-my-attendance li strong {
    font-family: var(--tsg-font-display);
    font-style: italic; font-weight: 900;
    text-transform: uppercase;
    color: var(--tsg-blue);
    font-size: 16px;
    letter-spacing: -0.3px;
    margin-right: 8px;
}

/* ─── Member Plans ──────────────────────────────────────────────────────────── */
.tsg-plans-list { display: grid; gap: 18px; font-family: var(--tsg-font-body); }
.tsg-plan-card {
    background: var(--tsg-surface);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 8px 24px rgba(0,20,137,.08);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.tsg-plan-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tsg-plan-card__type {
    background: rgba(230,100,21,.12);
    color: var(--tsg-orange);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.tsg-plan-card__date { color: var(--tsg-subtle); font-size: 12px; }
.tsg-plan-card__title {
    margin: 4px 0 6px;
    font-family: var(--tsg-font-display);
    font-style: italic; font-weight: 900;
    text-transform: uppercase;
    color: var(--tsg-blue);
    font-size: 24px; line-height: 1;
    letter-spacing: -0.3px;
}
.tsg-plan-card__author { color: var(--tsg-muted); font-size: 13px; margin: 0 0 12px; }
.tsg-plan-card__author strong { color: var(--tsg-ink); }
.tsg-plan-card__body { color: var(--tsg-ink); line-height: 1.6; }
.tsg-plan-card__body p { margin: 0 0 10px; }
.tsg-plan-card__rating { display: inline-flex; gap: 4px; margin-top: 14px; }
.tsg-star { background: transparent; border: none; cursor: pointer; font-size: 22px; color: var(--tsg-border); transition: color .15s ease, transform .15s ease; padding: 0; }
.tsg-star:hover { transform: scale(1.15); }
.tsg-star.is-filled { color: var(--tsg-orange); }

/* ─── Send Plan form ────────────────────────────────────────────────────────── */
.tsg-send-plan {
    background: var(--tsg-surface);
    border-radius: 18px;
    padding: 26px 28px;
    box-shadow: 0 10px 28px rgba(0,20,137,.08);
    font-family: var(--tsg-font-body);
    display: grid; gap: 14px;
    position: relative; overflow: hidden;
}
.tsg-send-plan__title { margin: 4px 0 8px; font-family: var(--tsg-font-display); font-style: italic; font-weight: 900; text-transform: uppercase; color: var(--tsg-blue); font-size: 26px; line-height: 1; letter-spacing: -0.3px; }
.tsg-send-plan__row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
@media (max-width: 600px) { .tsg-send-plan__row { grid-template-columns: 1fr; } }
.tsg-send-plan label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; color: var(--tsg-ink); }
.tsg-send-plan input, .tsg-send-plan select, .tsg-send-plan textarea {
    border: 1.5px solid var(--tsg-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-family: var(--tsg-font-body);
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tsg-send-plan input:focus, .tsg-send-plan select:focus, .tsg-send-plan textarea:focus { border-color: var(--tsg-blue); box-shadow: 0 0 0 4px rgba(0,20,137,.15); outline: none; }
.tsg-send-plan button.tsg-button {
    width: max-content;
    margin-top: 6px;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px;
    border-radius: 999px; border: none;
    background: var(--tsg-blue); color: #fff;
    font-weight: 800; font-size: 14px;
    cursor: pointer;
    font-family: var(--tsg-font-body);
    transition: background .15s ease, transform .15s ease;
}
.tsg-send-plan button.tsg-button:hover { background: var(--tsg-blue-dark); transform: translateY(-2px); }
.tsg-send-plan__msg { margin: 6px 0 0; font-size: 13px; font-weight: 600; }

/* ─── Sent Instructions list ────────────────────────────────────────────────── */
.tsg-sent-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-family: var(--tsg-font-body); }
.tsg-sent-item {
    background: var(--tsg-surface);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 3px 10px rgba(15,23,42,.05);
    border: 1px solid transparent;
    transition: border-color .2s ease;
}
.tsg-sent-item:hover { border-color: rgba(0,20,137,.08); }
.tsg-sent-item.is-archived { opacity: .55; }
.tsg-sent-item__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tsg-sent-item__head strong { color: var(--tsg-blue); font-weight: 700; }
.tsg-sent-item__head time { font-size: 11px; color: var(--tsg-subtle); }
.tsg-sent-item__meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 12px; color: var(--tsg-muted); }
.tsg-sent-item__rating { color: var(--tsg-orange); letter-spacing: 1px; }
.tsg-sent-item .tsg-badge { background: rgba(100,116,139,.15); color: var(--tsg-muted); padding: 2px 8px; border-radius: 999px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
