/* ========================================================
   MOTOR DE RESERVAS SHERPATUR — ESTILOS
   ======================================================== */
:root {
   --mr-brand: #10b981;
   --mr-hover: #86efac; /* verde pastel fijo para hover */
}

.mr-app-container {
    display: flex; flex-wrap: wrap; gap: 32px; max-width: 1000px;
    margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
}

.mr-left-pane { flex: 1 1 500px; }
.mr-right-pane { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }

/* Wrapper Calendario */
.mr-cal-wrapper {
    background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 24px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.mr-cal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; font-weight: 700; font-size: 1.15rem; color: #111827;
}

.mr-nav-btn {
    background: transparent; border: 1px solid #e5e7eb; border-radius: 8px;
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #4b5563; transition: all 0.2s;
}
.mr-nav-btn:hover:not(:disabled) { background: #f9fafb; color: #111827; }
.mr-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.mr-cal-dias-semana {
    display: grid; grid-template-columns: repeat(7, 1fr); text-align: center;
    font-size: 0.75rem; font-weight: 700; color: #6b7280; margin-bottom: 8px;
}

.mr-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }

.mr-dia-btn {
    appearance: none; background: #ffffff; border: 1px solid transparent;
    border-top: 1px solid #f3f4f6; padding: 0; cursor: pointer; position: relative;
    aspect-ratio: 1; display: flex; align-items: stretch; justify-content: stretch;
}

.mr-dia-content {
    width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between;
    align-items: flex-start; padding: 6px 8px; border-radius: 12px; transition: all 0.15s ease;
    border: 2px solid transparent;
}

/* Hover con mismo border-radius que el seleccionado */
.mr-dia-btn:hover:not(:disabled):not(.bloqueado):not(.pasado) .mr-dia-content {
    background: var(--mr-hover);
    border-color: var(--mr-hover);
    border-radius: 12px;
}

.mr-dia-num { font-size: 0.85rem; font-weight: 600; color: #374151; }
.mr-dia-price { font-size: 0.65rem; font-weight: 700; color: #9ca3af; align-self: flex-end; }

.mr-dia-btn.seleccionado .mr-dia-content { background: var(--mr-brand); }
.mr-dia-btn.seleccionado .mr-dia-num,
.mr-dia-btn.seleccionado .mr-dia-price { color: #ffffff; }

.mr-dia-btn.rango .mr-dia-content { background: var(--mr-brand); opacity: 0.45; border-radius: 0; }
.mr-dia-btn.rango .mr-dia-num { color: #ffffff; }
.mr-dia-btn.rango .mr-dia-price { color: #ffffff; }

.mr-dia-btn.seleccionado.borde-izq .mr-dia-content { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mr-dia-btn.seleccionado.borde-der .mr-dia-content { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.mr-dia-btn.solo-inicio .mr-dia-content { border-radius: 12px !important; }

.mr-dia-btn.bloqueado .mr-dia-content { background: #fef2f2; }
.mr-dia-btn.bloqueado .mr-dia-num { color: #ef4444; text-decoration: line-through; }
.mr-dia-btn.pasado .mr-dia-content { opacity: 0.35; }
.mr-dia-btn.pasado .mr-dia-num { color: #9ca3af; }

.mr-cal-leyenda { margin-top: 16px; font-size: 0.85rem; color: #6b7280; display: flex; justify-content: flex-end; }
.mr-leyenda-item { display: flex; align-items: center; gap: 6px; }
.mr-ley-dot { width: 10px; height: 10px; border-radius: 50%; }
.mr-ley-dot.ocupado { background: #fef2f2; border: 1px solid #fca5a5; }

/* CARD RESUMEN */
.mr-resumen-card {
    background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 24px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}
.mr-top-price-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.mr-currency { background: #f3f4f6; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; color: #4b5563; }
.mr-price-big { display: flex; align-items: baseline; gap: 6px; }
.mr-price-label { font-size: 0.85rem; color: #6b7280; }

.mr-info-box { border: 1px solid #e5e7eb; border-radius: 8px; display: flex; flex-direction: column; }
.mr-info-row { display: flex; align-items: flex-start; padding: 16px; gap: 12px; border-bottom: 1px solid #e5e7eb; }
.mr-info-row:last-child { border-bottom: none; }
.mr-icon { color: #9ca3af; margin-top: 2px; }

.mr-info-text { flex: 1; }
.mr-fechas-label { font-weight: 600; font-size: 0.95rem; color: #111827; }
.mr-noches-label { font-size: 0.85rem; color: #6b7280; margin-top: 2px; }

/* Selector Multiples de Pax */
.mr-pax-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mr-pax-item { display: flex; flex-direction: column; }
.mr-pax-item label { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; color: #6b7280; margin-bottom: 4px; }
.mr-pax-item select { border: none; font-weight: 700; font-size: 1rem; color: #1f2937; background: transparent; outline: none; padding: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }

.mr-error-box { background: #fdf2f8; color: #be185d; border: 1px solid #fbcfe8; padding: 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 500; margin-top: 16px; }

.mr-desglose { margin-top: 24px; }
.mr-desglose-fila { display: flex; justify-content: space-between; font-size: 0.95rem; color: #4b5563; margin-bottom: 12px; }
.mr-desglose-divider { height: 1px; background: #e5e7eb; margin: 16px 0; }

.mr-btn-action {
    display: block; width: 100%; background: var(--mr-brand); color: white; border: none; border-radius: 8px;
    padding: 16px; font-weight: 700; font-size: 1.05rem; cursor: pointer; margin-top: 20px; transition: background 0.2s, filter 0.2s;
}
.mr-btn-action { color: #ffffff !important; }
.mr-btn-action:disabled { opacity: 0.4; cursor: not-allowed; }
.mr-btn-action:hover:not(:disabled) { filter: brightness(0.9); }

/* BLOQUES SECUNDARIOS */
.mr-extra-block { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; margin-bottom: 12px; }
.mr-extra-title { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; font-size: 1.15rem; font-weight: 600; margin: 0 0 12px 0; color: #111827; }
.mr-horario-row { display: flex; justify-content: space-between; font-size: 0.9rem; color: #4b5563; margin-bottom: 8px; }
.mr-horario-row:last-child { margin-bottom: 0; }
.mr-flex-between { display: flex; align-items: center; justify-content: space-between; }
.mr-btn-link { background: none; border: none; color: var(--mr-brand); font-weight: 600; cursor: pointer; text-decoration: underline; font-size: 0.9rem; padding: 0; }

/* MODAL */
.mr-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.mr-modal-overlay.mr-visible { opacity: 1; pointer-events: auto; }
.mr-modal-content {
    background: #ffffff; padding: 32px; border-radius: 16px;
    max-width: 500px; width: 90%; transform: translateY(20px); transition: transform 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    max-height: 85vh; overflow-y: auto;
}
.mr-modal-overlay.mr-visible .mr-modal-content { transform: translateY(0); }
.mr-btn-close-modal {
    width: 100%; padding: 14px; border: 1px solid var(--mr-brand, #10b981); border-radius: 8px;
    background: #ffffff; color: var(--mr-brand, #10b981); font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: background 0.2s, color 0.2s;
}
.mr-btn-close-modal:hover { background: var(--mr-brand, #10b981); color: #ffffff; }
.mr-modal-content ul { list-style: disc !important; padding-left: 20px !important; margin: 0 0 16px !important; }
.mr-modal-content ul li { list-style: disc !important; list-style-type: disc !important; display: list-item !important; padding-left: 0 !important; margin-bottom: 6px !important; color: #4b5563 !important; font-size: 0.9rem !important; }
.mr-modal-content ul li::before { content: none !important; display: none !important; width: 0 !important; height: 0 !important; }
.mr-modal-content ul li::after { content: none !important; display: none !important; }
.mr-modal-content ul li::marker { color: #4b5563 !important; }
.mr-modal-lista { list-style: disc !important; padding-left: 20px !important; margin-bottom: 16px !important; }
.mr-modal-lista li { list-style: disc !important; list-style-type: disc !important; display: list-item !important; padding-left: 0 !important; color: #4b5563; font-size: 0.9rem; margin-bottom: 6px !important; }
.mr-modal-lista li::before { content: none !important; display: none !important; width: 0 !important; height: 0 !important; }
.mr-modal-lista li::after { content: none !important; display: none !important; }
.mr-modal-lista li::marker { color: #4b5563 !important; }
.mr-body-no-scroll { overflow: hidden; }

/* RESPONSIVE CALENDARIO - MOBILE */
@media (max-width: 768px) {
    .mr-app-container {
        gap: 16px;
        padding: 0 4px;
    }

    .mr-left-pane,
    .mr-right-pane {
        flex: 1 1 100%;
        min-width: 0;
    }

    .mr-cal-wrapper {
        padding: 16px 6px;
        box-sizing: border-box;
        width: 100%;
        overflow: hidden;
    }

    .mr-cal-header {
        margin-bottom: 16px;
        font-size: 1rem;
    }

    .mr-cal-grid {
        width: 100%;
    }

    .mr-dia-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .mr-dia-content {
        padding: 6px 2px;
        box-sizing: border-box;
    }

    .mr-dia-num {
        font-size: 0.8rem;
    }

    .mr-dia-price {
        font-size: 0.65rem;
        display: block;
    }
}

@media (max-width: 380px) {
    .mr-cal-wrapper {
        padding: 12px 4px;
    }

    .mr-dia-content {
        padding: 3px 2px;
        border-radius: 6px;
    }
}

/* Días del mes siguiente */
.mr-dia-mes-siguiente { opacity: 0.45; }
.mr-dia-mes-siguiente.seleccionado,
.mr-dia-mes-siguiente.rango { opacity: 1; }

/* Día bloqueado pero válido como check-out */
.mr-dia-btn.bloqueado-checkout { opacity: 0.6; cursor: pointer; }
.mr-dia-btn.bloqueado-checkout:hover { opacity: 1; background: rgba(16,185,129,0.1); }

/* Contadores de huéspedes +/- */
.mr-pax-select-wrap { position: relative; display: inline-block; width: 100%; }
.mr-pax-select-wrap::after { content: '▾'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #6b7280; font-size: 0.85rem; pointer-events: none; }
.mr-pax-select-wrap select { appearance: none; -webkit-appearance: none; width: 100%; padding-right: 28px; }