/* =====================================================================
   mp-checkout.css  — v0.16.0
   Estilos para [mp-checkout]: configuración del plan elegido
   ===================================================================== */

.mp-checkout-wrap *,
.mp-checkout-wrap *::before,
.mp-checkout-wrap *::after { box-sizing: border-box; }

/* Enlace "Cambiar plan" */
.mp-checkout-back { margin-bottom: 20px; }
.mp-back-link {
    color: #0a2463;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: .8;
    transition: opacity .15s;
}
.mp-back-link:hover { opacity: 1; }

/* Layout dos columnas */
.mp-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: flex-start;
}

/* Columna principal */
.mp-checkout-main { display: flex; flex-direction: column; gap: 24px; }

/* Secciones */
.mp-checkout-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}
.mp-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0a2463;
    margin: 0 0 4px;
}
.mp-section-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
}

/* Plan seleccionado */
.mp-selected-plan {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.mp-selected-plan__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    color: #0a2463;
    background: #f0f4ff;
    border-radius: 12px;
}
.mp-ico { width: 26px; height: 26px; fill: currentColor; display: block; }
.mp-ico--img { width: 32px; height: 32px; object-fit: contain; }
.mp-selected-plan__info { flex: 1; }
.mp-selected-plan__badge {
    display: inline-block;
    background: #f0f4ff;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.mp-selected-plan__name {
    font-size: 20px;
    font-weight: 800;
    color: #0a2463;
    margin: 0 0 8px;
    line-height: 1.1;
}
.mp-selected-plan__price {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
    color: #ff8c00;
    margin-bottom: 12px;
}
.mp-selected-plan__price sup {
    font-size: 14px;
    font-weight: 700;
    margin-top: 5px;
}
.mp-selected-plan__price strong {
    font-size: 38px;
    font-weight: 800;
}
.mp-selected-plan__price .mp-cents {
    font-size: 18px;
    font-weight: 800;
    margin-top: 5px;
}
.mp-selected-plan__price small {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    align-self: flex-end;
    margin-bottom: 4px;
}
.mp-selected-plan__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.mp-selected-plan__features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
    color: #374151;
}
.mp-selected-plan__features li:last-child { border-bottom: 0; }
.mp-selected-plan__features .mp-feat-ico {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-size: 14px;
}

/* Grid de períodos */
.mp-period-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.mp-period-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
    min-width: 90px;
}
.mp-period-btn:hover {
    border-color: #0a2463;
    color: #0a2463;
}
.mp-period-btn--active {
    border-color: #ff8c00;
    background: rgba(255,140,0,.06);
    color: #b45309;
}
.mp-period-badge {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

/* Lista de servicios */
.mp-services-list { display: flex; flex-direction: column; gap: 0; }
.mp-service-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
}
.mp-service-item:last-child { border-bottom: 0; }
.mp-service-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #ff8c00;
    cursor: pointer;
}
.mp-service-info { flex: 1; }
.mp-service-name { display: block; font-size: 14px; font-weight: 600; color: #1f2937; }
.mp-service-desc { display: block; font-size: 12px; color: #6b7280; margin-top: 2px; }
.mp-service-price {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    white-space: nowrap;
}

/* ── Panel resumen (sticky) ─────────────────────────────────────── */
.mp-checkout-summary {
    position: sticky;
    top: 24px;
}
.mp-summary-inner {
    background: #0a2463;
    border-radius: 16px;
    padding: 24px;
    color: #fff;
}
.mp-summary-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.mp-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: rgba(255,255,255,.8);
    margin-bottom: 8px;
    gap: 8px;
}
.mp-summary-plan { font-weight: 600; color: #fff; }
.mp-sum-discount { color: #86efac; }
.mp-summary-services,
.mp-summary-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0;
}
.mp-summary-services .mp-sum-svc-line,
.mp-summary-options .mp-sum-svc-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,.7);
    gap: 8px;
}
.mp-summary-divider {
    height: 1px;
    background: rgba(255,255,255,.15);
    margin: 12px 0;
}
.mp-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    gap: 8px;
}
.mp-sum-period-note {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    margin: 4px 0 20px;
    text-align: right;
}

/* Botón carrito */
.mp-btn-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 10px;
    border: 0;
    background: #ff8c00;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.mp-btn-cart:hover { background: #e67e00; transform: translateY(-1px); }
.mp-btn-cart:disabled { opacity: .6; cursor: default; transform: none; }

.mp-sum-note {
    font-size: 11px;
    color: rgba(255,255,255,.5);
    text-align: center;
    margin: 10px 0 0;
}

/* Estado sin plan */
.mp-no-plan {
    text-align: center;
    padding: 60px 20px;
}
.mp-no-plan p { font-size: 16px; color: #6b7280; margin-bottom: 20px; }
.mp-back-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #0a2463;
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
}
.mp-back-btn:hover { background: #1e3a8a; }

/* Utilidades */
.mp-hidden { display: none !important; }
[hidden] { display: none !important; }

/* Responsive */
@media (max-width: 860px) {
    .mp-checkout-layout {
        grid-template-columns: 1fr;
    }
    .mp-checkout-summary {
        position: static;
    }
}
@media (max-width: 480px) {
    .mp-selected-plan { flex-direction: column; gap: 8px; }
    .mp-period-grid { gap: 8px; }
    .mp-period-btn { padding: 10px 14px; min-width: 80px; }
}

/* =====================================================================
   v0.17.0 - Opciones de servidor (VPS / Dedicado): SO, panel, administracion
   ===================================================================== */
.mp-opt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 12px;
}
.mp-opt {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    min-height: 92px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.mp-opt:hover { border-color: #9db4e4; }
.mp-opt--on {
    border-color: #0a2463;
    background: #f3f6fd;
    box-shadow: 0 0 0 3px rgba(10, 36, 99, .08);
}
.mp-opt--off {
    opacity: .45;
    cursor: not-allowed;
    background: #f9fafb;
}
.mp-opt--off:hover { border-color: #e5e7eb; }
.mp-opt-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.mp-opt-input:focus-visible + .mp-opt__body .mp-opt__label {
    outline: 2px solid #ff8c00;
    outline-offset: 3px;
}
.mp-opt__body { display: flex; flex-direction: column; gap: 4px; }
.mp-opt__label { font-size: 15px; font-weight: 700; color: #0a2463; }
.mp-opt__desc { font-size: 12.5px; line-height: 1.4; color: #6b7280; }
.mp-opt__price { font-size: 13px; font-weight: 700; color: #065f46; }
.mp-opt--on .mp-opt__price { color: #0a2463; }

/* Resumen: lineas de opciones, errores y estado de carga */
.mp-summary-options:empty { display: none; }
.mp-summary-options .mp-sum-svc-line span:last-child { white-space: nowrap; }
.mp-sum-line--good { color: #34d399; }
.mp-cart-error {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 13px;
    line-height: 1.4;
}
.mp-cart-error[hidden] { display: none !important; }
#mp-sum-total.mp-loading { opacity: .55; }

/* v0.19.1 - icono dentro de cada opcion */
.mp-opt__icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; color: #0a2463; background: #f0f4ff; border-radius: 8px; margin-bottom: 2px; }
.mp-opt__icon .mp-ico { width: 19px; height: 19px; fill: currentColor; }
.mp-opt__icon .mp-ico--img { width: 22px; height: 22px; object-fit: contain; }
.mp-opt--off .mp-opt__icon { opacity: .5; }

/* v0.19.2 - icono vectorial en caracteristicas */
.mp-feat-ico .mp-ico { width: 15px; height: 15px; fill: currentColor; vertical-align: -2px; color: #0a2463; }

/* v0.19.4 - logos anchos (cPanel, Plesk) */
.mp-opt__icon { width: auto; min-width: 34px; padding: 0 7px; align-self: flex-start; }
.mp-ico--wide { width: 56px; height: 20px; }
.mp-opt__icon .mp-ico--wide { width: 56px; height: 20px; }

/* v0.20.0 - cifras del plan */
.mp-specs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; padding: 0; }
.mp-specs__item { display: flex; flex-direction: column; gap: 2px; min-width: 72px; padding: 8px 12px; background: #f0f4ff; border-radius: 8px; }
.mp-specs dt { font-size: 11px; color: #6b7280; font-weight: 600; margin: 0; }
.mp-specs dd { font-size: 15px; font-weight: 800; color: #0a2463; margin: 0; }

.mp-ico--img { fill: none; }
.mp-opt__icon .mp-ico--img { width: 22px; height: 22px; object-fit: contain; }

/* v0.22.0 - caracteristicas dentro de cada opcion */
.mp-opt__feats { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.mp-opt__feat { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.35; color: #374151; }
.mp-opt__feat-ico { flex-shrink: 0; width: 14px; text-align: center; color: #0a2463; font-size: 11px; }
.mp-opt__feat-ico .mp-ico { width: 12px; height: 12px; fill: currentColor; vertical-align: -1px; }
