/* =====================================================
   Mikanah Servicios — Wizard de Registro
   ===================================================== */

/* ── Variables ── */
:root {
    --mks-primary: #76236c;
    --mks-primary-dark: #5a1a52;
    --mks-primary-light: #f3e6f1;
    --mks-accent: #e85d26;
    --mks-green: #059669;
    --mks-red: #dc2626;
    --mks-border: #e5e7eb;
    --mks-bg: #f9fafb;
    --mks-white: #fff;
    --mks-text: #111827;
    --mks-muted: #6b7280;
    --mks-radius: 14px;
    --mks-shadow: 0 4px 24px rgba(0,0,0,.09);
    --mks-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Contenedor principal ── */
.mks-wizard-wrap {
    max-width: 760px;
    margin: 0 auto;
    font-family: var(--mks-font);
    color: var(--mks-text);
}

/* ── Barra de progreso ── */
.mks-wizard-progress {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
    gap: 0;
}
.mks-wizard-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    cursor: default;
}
.mks-wizard-step-dot:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--mks-border);
    z-index: 0;
    transition: background .3s;
}
.mks-wizard-step-dot.done:not(:last-child)::after { background: var(--mks-primary); }
.mks-wizard-dot-circle {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--mks-border);
    background: var(--mks-white);
    display: flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 700; color: var(--mks-muted);
    position: relative; z-index: 1;
    transition: all .25s;
}
.mks-wizard-step-dot.active .mks-wizard-dot-circle {
    border-color: var(--mks-primary);
    background: var(--mks-primary);
    color: #fff;
}
.mks-wizard-step-dot.done .mks-wizard-dot-circle {
    border-color: var(--mks-green);
    background: var(--mks-green);
    color: #fff;
}
.mks-wizard-dot-label {
    font-size: .68rem;
    color: var(--mks-muted);
    margin-top: 5px;
    text-align: center;
    line-height: 1.2;
    max-width: 64px;
}
.mks-wizard-step-dot.active .mks-wizard-dot-label { color: var(--mks-primary); font-weight: 700; }
.mks-wizard-step-dot.done .mks-wizard-dot-label   { color: var(--mks-green); }

/* ── Paneles de pasos ── */
.mks-wizard-panels { position: relative; }
.mks-wizard-panel  { display: none; animation: mksSlideIn .25s ease; }
.mks-wizard-panel.active { display: block; }
@keyframes mksSlideIn { from { opacity:0; transform:translateX(16px); } to { opacity:1; transform:none; } }

.mks-wizard-panel-title {
    font-size: 1.25rem; font-weight: 800;
    color: var(--mks-primary);
    margin: 0 0 6px;
}
.mks-wizard-panel-sub {
    font-size: .88rem; color: var(--mks-muted);
    margin: 0 0 24px;
}

/* ── Paso 1: Selección tipo ── */
.mks-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.mks-type-card {
    border: 2px solid var(--mks-border);
    border-radius: var(--mks-radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: var(--mks-white);
    position: relative;
}
.mks-type-card input { position: absolute; opacity: 0; }
.mks-type-card:hover { border-color: var(--mks-primary); background: var(--mks-primary-light); }
.mks-type-card.selected { border-color: var(--mks-primary); background: var(--mks-primary-light); }
.mks-type-card.selected::after {
    content: '✓';
    position: absolute; top: 10px; right: 14px;
    color: var(--mks-primary); font-weight: 900; font-size: 1rem;
}
.mks-type-icon  { font-size: 3rem; margin-bottom: 10px; }
.mks-type-label { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.mks-type-desc  { font-size: .82rem; color: var(--mks-muted); }

/* ── Paso 2: Paquetes ── */
.mks-pkg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.mks-pkg-card {
    border: 2px solid var(--mks-border);
    border-radius: var(--mks-radius);
    padding: 20px 16px;
    cursor: pointer;
    transition: all .2s;
    background: var(--mks-white);
    position: relative;
    display: block;
}
.mks-pkg-card input { position: absolute; opacity: 0; }
.mks-pkg-card:hover  { border-color: var(--mks-primary); }
.mks-pkg-card.selected { border-color: var(--mks-primary); background: var(--mks-primary-light); }
.mks-pkg-card--featured { border-color: var(--mks-accent); }
.mks-pkg-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--mks-accent); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 12px; border-radius: 20px; white-space: nowrap; }
.mks-pkg-name  { font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.mks-pkg-price { font-size: 1.6rem; font-weight: 900; color: var(--mks-primary); margin-bottom: 10px; }
.mks-pkg-price small { font-size: .7rem; font-weight: 400; color: var(--mks-muted); }
.mks-pkg-features { list-style: none; padding: 0; margin: 0; font-size: .82rem; color: var(--mks-muted); }
.mks-pkg-features li { padding: 3px 0; }
.mks-pkg-desc { font-size: .8rem; color: var(--mks-muted); margin-top: 8px; }

/* ── Paso 3: Formulario ── */
.mks-form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.mks-field {
    flex: 1; min-width: 200px;
    margin-bottom: 16px;
}
.mks-field label {
    display: block; font-size: .85rem;
    font-weight: 700; margin-bottom: 5px; color: var(--mks-text);
}
.mks-field label .mks-required-mark { color: var(--mks-red); margin-left: 2px; }
.mks-field input,
.mks-field select,
.mks-field textarea {
    width: 100%; padding: 11px 13px;
    border: 1.5px solid var(--mks-border);
    border-radius: 9px; font-size: .93rem;
    font-family: var(--mks-font);
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    background: var(--mks-white); color: var(--mks-text);
}
.mks-field input:focus,
.mks-field select:focus,
.mks-field textarea:focus {
    border-color: var(--mks-primary); outline: none;
    box-shadow: 0 0 0 3px rgba(118,35,108,.1);
}
.mks-field input.error { border-color: var(--mks-red); }
.mks-field .mks-error-msg { font-size: .78rem; color: var(--mks-red); margin-top: 3px; display: none; }

/* WhatsApp con bandera */
.mks-whatsapp-wrap {
    display: flex !important;
    gap: 8px !important;
    align-items: stretch !important;
}
.mks-wa-country {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: 88px !important;
    max-width: 88px !important;
    padding: 0 6px !important;
    border: 1.5px solid var(--mks-border) !important;
    border-radius: 9px !important;
    font-size: .8rem !important;
    background: var(--mks-white) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    height: auto !important;
}
.mks-wa-number {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
}

/* Mapa Leaflet */
#mks-map-container { height: 240px; border-radius: 9px; overflow: hidden; border: 1.5px solid var(--mks-border); margin-top: 8px; }
.mks-map-search { display: flex; gap: 8px; margin-bottom: 8px; }
.mks-map-search input { flex: 1; }
.mks-map-search button { flex-shrink: 0; }

/* Horario */
.mks-schedule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.mks-schedule-day { background: var(--mks-bg); border: 1px solid var(--mks-border); border-radius: 8px; padding: 10px 12px; }
.mks-schedule-day label { font-size: .82rem; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.mks-schedule-times { display: flex; gap: 6px; align-items: center; font-size: .8rem; }
.mks-schedule-times input { width: 80px; padding: 5px 7px; font-size: .8rem; }
.mks-schedule-times .mks-closed-label { color: var(--mks-muted); font-size: .78rem; }

/* ── Paso 4: Zonas ── */
.mks-zone-selector { margin-bottom: 20px; }
.mks-zone-selector select { width: 100%; margin-bottom: 12px; }
.mks-municipios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    border: 1.5px solid var(--mks-border);
    border-radius: 9px;
    padding: 12px;
    background: var(--mks-white);
}
.mks-mun-check {
    display: flex; align-items: center; gap: 8px;
    font-size: .85rem; cursor: pointer;
    padding: 6px 8px; border-radius: 6px;
    border: 1px solid var(--mks-border);
    transition: all .15s; background: var(--mks-white);
}
.mks-mun-check:hover, .mks-mun-check.selected { background: var(--mks-primary-light); border-color: var(--mks-primary); }
.mks-mun-check input { width: 15px; height: 15px; accent-color: var(--mks-primary); }
.mks-zone-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; min-height: 32px; }
.mks-zone-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--mks-primary-light); color: var(--mks-primary);
    border: 1px solid var(--mks-primary); border-radius: 20px;
    padding: 4px 10px; font-size: .8rem; font-weight: 600;
}
.mks-zone-tag-x { cursor: pointer; font-weight: 900; line-height: 1; }
.mks-zone-counter { font-size: .82rem; color: var(--mks-muted); margin-top: 8px; }

/* ── Paso 5: Categorías ── */
.mks-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.mks-cat-check {
    display: flex; flex-direction: column; align-items: center;
    padding: 14px 10px; border: 2px solid var(--mks-border);
    border-radius: 10px; cursor: pointer; text-align: center;
    font-size: .83rem; transition: all .2s; background: var(--mks-white);
}
.mks-cat-check input { display: none; }
.mks-cat-check:hover { border-color: var(--mks-primary); background: var(--mks-primary-light); }
.mks-cat-check.selected { border-color: var(--mks-primary); background: var(--mks-primary-light); }
.mks-cat-check.disabled { opacity: .45; cursor: not-allowed; }
.mks-cat-icon { font-size: 1.6rem; margin-bottom: 5px; }
.mks-cat-limit-msg { font-size: .82rem; color: var(--mks-accent); font-weight: 600; margin-bottom: 12px; }

/* ── Paso 6: Redes sociales ── */
.mks-social-list { display: flex; flex-direction: column; gap: 12px; }
.mks-social-item { display: flex; align-items: center; gap: 12px; }
.mks-social-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--mks-primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.mks-social-item input { flex: 1; }

/* ── Paso 7: Resumen ── */
.mks-summary-box {
    background: var(--mks-primary-light);
    border: 1.5px solid var(--mks-primary);
    border-radius: var(--mks-radius);
    padding: 24px; margin-bottom: 20px;
}
.mks-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .9rem; border-bottom: 1px solid rgba(118,35,108,.15); }
.mks-summary-row:last-child { border: none; }
.mks-summary-row span:first-child { color: var(--mks-muted); }
.mks-summary-row span:last-child  { font-weight: 700; }

/* ── Navegación ── */
.mks-wizard-nav {
    display: flex; justify-content: space-between;
    align-items: center; margin-top: 28px; padding-top: 20px;
    border-top: 1px solid var(--mks-border);
}
.mks-btn-prev, .mks-btn-next, .mks-btn-submit {
    padding: 12px 28px; border-radius: 9px;
    font-weight: 700; font-size: .95rem;
    cursor: pointer; border: none; transition: all .2s;
    display: inline-flex; align-items: center; gap: 8px;
}
.mks-btn-prev   { background: var(--mks-bg); color: var(--mks-text); border: 1.5px solid var(--mks-border); }
.mks-btn-prev:hover { background: #e5e7eb; }
.mks-btn-next   { background: var(--mks-primary); color: #fff; }
.mks-btn-next:hover { background: var(--mks-primary-dark); }
.mks-btn-submit { background: var(--mks-green); color: #fff; }
.mks-btn-submit:hover { background: #047857; }
.mks-btn-next:disabled, .mks-btn-submit:disabled { opacity: .5; cursor: not-allowed; }

/* Notices */
.mks-notice-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 10px; padding: 16px 20px; text-align: center; font-size: 1rem; }
.mks-notice-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; border-radius: 10px; padding: 14px 18px; font-size: .9rem; }

/* Responsive */
@media (max-width: 580px) {
    .mks-type-grid { grid-template-columns: 1fr; }
    .mks-wizard-progress { gap: 0; }
    .mks-wizard-dot-label { display: none; }
    .mks-form-row { flex-direction: column; }
    .mks-pkg-grid { grid-template-columns: 1fr; }
    .mks-cats-grid { grid-template-columns: repeat(2,1fr); }
}
