/* Calendario temático compartido — index, editar-cliente, admin */

@keyframes calCellIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes calSelectedPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--cal-glow), 0 0 12px var(--cal-glow); }
    50% { box-shadow: 0 0 0 3px var(--cal-glow), 0 0 18px var(--cal-glow); }
}
@keyframes calBorderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes calSaturadoPulse {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 0.55; }
}
@keyframes calLegendPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

.studio-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(9,9,11,0.95), rgba(24,24,27,0.9));
}
.studio-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--cal-accent, #2dd4bf), rgba(168,85,247,0.5), var(--cal-accent, #2dd4bf));
    background-size: 200% 200%;
    animation: calBorderFlow 6s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.cal-studio {
    --mouse-x: 50%;
    --mouse-y: 50%;
}
.cal-spotlight::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle 120px at var(--mouse-x) var(--mouse-y), rgba(var(--cal-accent-rgb, 45,212,191), 0.12), transparent 70%);
    pointer-events: none;
    transition: opacity 0.2s ease;
}
@media (hover: none) {
    .cal-spotlight::after { display: none; }
}

.cal-month-title {
    background: linear-gradient(90deg, var(--cal-accent, #2dd4bf), #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.modal-step-label {
    color: var(--cal-accent, #2dd4bf);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.5rem;
}

.cal-nav-btn {
    min-height: 36px;
    min-width: 36px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
@media (hover: hover) {
    .cal-nav-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 0 12px var(--cal-glow, rgba(45,212,191,0.35));
    }
}
.cal-nav-btn:active { transform: scale(0.95); }

.cal-day-disponible,
.cal-day-seleccionado,
.cal-day-saturado,
.cal-day-bloqueado,
.cal-day-cargando,
.cal-day-inactivo {
    min-height: 40px;
}
@media (max-width: 639px) {
    .modal-reserva-studio .cal-day-disponible,
    .modal-reserva-studio .cal-day-seleccionado,
    .modal-reserva-studio .cal-day-saturado,
    .modal-reserva-studio .cal-day-bloqueado,
    .modal-reserva-studio .cal-day-cargando,
    .modal-reserva-studio .cal-day-inactivo {
        min-height: 34px;
    }
}

.cal-cell-animate { animation: calCellIn 0.35s ease-out both; }

.cal-day-disponible {
    background: rgba(39,39,42,0.9);
    color: #fafafa;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
@media (hover: hover) {
    .cal-day-disponible:hover {
        transform: scale(1.06);
        box-shadow: 0 0 14px var(--cal-glow, rgba(45,212,191,0.35));
        background: rgba(var(--cal-accent-rgb, 45,212,191), 0.25);
    }
}
.cal-day-disponible:active { transform: scale(0.96); }

.cal-day-seleccionado {
    background: linear-gradient(135deg, var(--cal-accent, #2dd4bf), #9333ea);
    color: #fff;
    font-weight: 700;
    animation: calSelectedPulse 2s ease-in-out infinite;
}
.cal-day-saturado {
    background: rgba(69,10,10,0.45);
    color: rgba(248,113,113,0.85);
    cursor: not-allowed;
    text-decoration: line-through;
    text-decoration-color: rgba(248,113,113,0.45);
    animation: calSaturadoPulse 2.5s ease-in-out infinite;
}
.cal-day-bloqueado {
    background: rgba(69,45,10,0.35);
    color: rgba(245,158,11,0.85);
    cursor: not-allowed;
}
.cal-day-cargando {
    background: rgba(39,39,42,0.5);
    color: #71717a;
    cursor: wait;
    opacity: 0.5;
}
.cal-day-inactivo {
    background: #09090b;
    opacity: 0.3;
    cursor: not-allowed;
    color: #52525b;
}

.cal-legend-dot-live { animation: calLegendPulse 2.5s ease-in-out infinite; }

.cal-day-count {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 9px;
    line-height: 1.2;
    background: rgba(0, 0, 0, 0.55);
    color: #fafafa;
    padding: 0 4px;
    border-radius: 4px;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .cal-day-disponible:hover { transform: none; }
    .cal-spotlight::after { display: none; }
    .studio-panel::before { animation: none; }
    .cal-cell-animate { animation: none; }
    .cal-day-seleccionado { animation: none; }
    .cal-day-saturado { animation: none; }
    .cal-legend-dot-live { animation: none; }
}
