/* ════════════════════════════════════════════════════════════════
   WF Network Subscriptions — Public / Dashboard Styles
   display:block !important en todos los inputs/selects del frontend
   ════════════════════════════════════════════════════════════════ */

/* ── FORZAR VISIBILIDAD ────────────────────────────────────────── */
.wfns-dash input[type=text],
.wfns-dash input[type=email],
.wfns-dash input[type=number],
.wfns-dash input[type=date],
.wfns-dash textarea,
.wfns-dash select,
.wfns-card input[type=text],
.wfns-card input[type=email],
.wfns-card input[type=number],
.wfns-card textarea,
.wfns-card select { display: block !important; }

/* ── DASHBOARD LAYOUT ──────────────────────────────────────────── */
.wfns-dash {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px 48px;
    color: #111827;
}
.wfns-dash-header {
    padding: 24px 0 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.wfns-dash-welcome {
    display: flex;
    align-items: center;
    gap: 14px;
}
.wfns-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: .12s;
    flex-shrink: 0;
}
.wfns-logout-btn:hover { border-color: #fca5a5; color: #dc2626; background: #fef2f2; }
.wfns-dash-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.wfns-dash-title  { font-size: 20px; font-weight: 700; margin: 0 0 2px; }
.wfns-dash-subtitle { font-size: 13px; color: #6b7280; margin: 0; }
.wfns-dash-grid {
    display: flex;
    gap: 20px;
    align-items: start;
}
.wfns-dash-main  { display: flex; flex-direction: column; gap: 20px; }
.wfns-dash-side  { display: flex; flex-direction: column; gap: 16px; }

/* ── CARDS ─────────────────────────────────────────────────────── */
.wfns-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.wfns-card-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #374151;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}
.wfns-card-badge {
    margin-left: auto;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}
.wfns-card-empty { color: #9ca3af; font-size: 13px; text-align: center; padding: 16px 0; margin: 0; }

/* ── SITES GRID ────────────────────────────────────────────────── */
.wfns-sites-grid         { display: grid; gap: 14px; }
.wfns-sites-cols-1       { grid-template-columns: 1fr; }
.wfns-sites-cols-2       { grid-template-columns: repeat(2, 1fr); }
.wfns-sites-cols-3       { grid-template-columns: repeat(3, 1fr); }
.wfns-site-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    background: #fafafa;
    transition: border-color .15s, box-shadow .15s;
}
.wfns-site-card:hover    { border-color: #93c5fd; box-shadow: 0 2px 8px rgba(37,99,235,.08); }
.wfns-site-card-hd       { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.wfns-site-icon          { color: #2563eb; flex-shrink: 0; margin-top: 2px; }
.wfns-site-info          { flex: 1; min-width: 0; }
.wfns-site-name          { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wfns-site-url {
    font-size: 11px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.wfns-site-url:hover     { color: #2563eb; }
.wfns-site-progress      { height: 3px; background: #e5e7eb; border-radius: 2px; margin-bottom: 10px; overflow: hidden; }
.wfns-site-progress-bar  { height: 100%; background: linear-gradient(90deg, #2563eb, #7c3aed); border-radius: 2px; transition: width .3s; }
.wfns-site-meta          { font-size: 11px; color: #9ca3af; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wfns-site-actions       { display: flex; gap: 8px; }

/* ── BOTONES ───────────────────────────────────────────────────── */
.wfns-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    background: #fff;
    transition: .12s;
    cursor: pointer;
}
.wfns-btn-sm:hover       { border-color: #93c5fd; color: #2563eb; background: #eff6ff; }
.wfns-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s;
}
.wfns-btn-primary:hover  { background: #1d4ed8; color: #fff; }
.wfns-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 13px;
    color: #111827;
    background: #fff;
    transition: border-color .12s;
}
.wfns-input:focus        { border-color: #2563eb; outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* ── STATUS BADGES ─────────────────────────────────────────────── */
.wfns-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── PLAN SUMMARY ──────────────────────────────────────────────── */
.wfns-plan-name    { font-size: 18px; font-weight: 800; color: #111827; margin-bottom: 10px; }
.wfns-plan-slots   { font-size: 12px; color: #6b7280; display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.wfns-plan-renewal { font-size: 13px; color: #374151; display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.wfns-plan-amount  { font-size: 15px; font-weight: 700; color: #2563eb; display: flex; align-items: center; gap: 5px; }

/* ── BILLING TABLE ─────────────────────────────────────────────── */
/* La tabla NO se apila: mantiene columnas en una fila y el contenedor hace
   scroll horizontal (-webkit-overflow-scrolling para inercia en iOS). */
.wfns-billing-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; max-width: 100%; }
.wfns-billing-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wfns-billing-table th { text-align: left; padding: 6px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #9ca3af; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.wfns-billing-table td { padding: 10px 10px; border-bottom: 1px solid #f3f4f6; white-space: nowrap; }
/*enlaces de pago*/
body .wfns-paylink-item{
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 4px 0;
    color: #374151;
    flex-direction: column;
    line-height: 1.3;
    background: aliceblue;
    border-bottom: 1px solid grey;
}
body .wfns-paylink{
    padding: 0!important;
}
body .wfns-paylink-card{
    padding: 10px !important;
}
body .entry-content {
    display: flex;
    justify-content: center;
}
body .wfns-paylink,
body .wfns-login-wrap{
    margin: 10px !important;
}
body .wfns-login-wrap{
    width: 60% !important;
    max-width: 100% !important;
}
@media (max-width:667px){
    body .wfns-login-wrap{
    width: 100% !important;
    max-width: 100% !important;
    margin: 0px !important;
}
}
/*Login*/
body .wfns-l-passfield .wfns-l-eye{
    top: 2em !important;
    border-radius: 100px;
}
/* ── DOMAIN SECTION ────────────────────────────────────────────── */
.wfns-domain-upsell {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: linear-gradient(135deg, #eff6ff, #faf5ff);
    border: 1px solid #c4b5fd;
    border-radius: 10px;
    padding: 16px;
}
.wfns-domain-upsell strong { display: block; font-size: 14px; margin-bottom: 4px; }
.wfns-domain-upsell p { font-size: 12px; color: #6b7280; margin: 0 0 10px; }
.wfns-domain-info { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #374151; background: #eff6ff; border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; }
.wfns-domain-input-group { display: flex; gap: 8px;flex-direction: column;align-items: center; }
.wfns-domain-row { padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.wfns-domain-info-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── PROFILE GRID ──────────────────────────────────────────────── */
.wfns-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.wfns-full         { grid-column: 1 / -1; }
.wfns-mb           { display: flex; flex-direction: column; }
.wfns-label        { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; margin-bottom: 4px; }
.wfns-form-footer  { display: flex; align-items: center; gap: 10px; }

/* ── NOTICES ───────────────────────────────────────────────────── */
.wfns-dash-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin: 16px 0;
}
.wfns-dash-notice--warn { background: #fef9c3; border: 1px solid #fde047; color: #854d0e; }
.wfns-dash-notice--info { background: #eff6ff; border: 1px solid #93c5fd; color: #1d4ed8; }

/* ── PLAN FIELD (selector de planes en el formulario) ─────────── */
/* (ya definido en PlanFieldRenderer::get_styles(), repetido aquí como fallback de hoja de estilos) */

/* ── TABS (Mi cuenta) ──────────────────────────────────────────── */
.wfns-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e5e7eb; margin-bottom: 16px; flex-wrap: wrap; }
.wfns-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border: none; background: none; cursor: pointer;
    font-size: 13px; font-weight: 600; color: #6b7280;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.wfns-tab:hover { color: #2563eb; }
.wfns-tab.is-active { color: #2563eb; border-bottom-color: #2563eb; }
.wfns-tab-panel { display: none; }
.wfns-tab-panel.is-active { display: block; }
.wfns-pass-block { border-top: 1px solid #f3f4f6; padding-top: 14px; margin-bottom: 16px; }

/* ── PLAN CARDS (cambiar de plan) ──────────────────────────────── */
.wfns-plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.wfns-plan-card {
    position: relative; border: 1.5px solid #e5e7eb; border-radius: 12px;
    padding: 16px; background: #fafafa; display: flex; flex-direction: column;
    transition: border-color .15s, box-shadow .15s;
}
.wfns-plan-card:hover { border-color: #93c5fd; box-shadow: 0 2px 10px rgba(37,99,235,.08); }
.wfns-plan-badge { position: absolute; top: -9px; right: 12px; background: #2563eb; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.wfns-plan-card-name { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.wfns-plan-card-price { font-size: 18px; font-weight: 800; color: #2563eb; margin-bottom: 8px; }
.wfns-plan-card-price span { font-size: 12px; font-weight: 500; color: #9ca3af; }
.wfns-plan-card-desc { font-size: 12px; color: #6b7280; margin: 0 0 10px; }
.wfns-plan-card-feats { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 5px; }
.wfns-plan-card-feats li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #374151; }
.wfns-plan-card-feats li svg { color: #16a34a; flex-shrink: 0; }
.wfns-plan-card .wfns-btn-primary { margin-top: auto; justify-content: center; }

/* ── INVOICES LIST ─────────────────────────────────────────────── */
.wfns-inv-list { display: flex; flex-direction: column; }
.wfns-inv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f3f4f6; flex-wrap: wrap; }
.wfns-inv-row:last-child { border-bottom: none; }
.wfns-inv-meta { display: flex; flex-direction: column; gap: 2px; }
.wfns-inv-num { font-weight: 700; font-size: 13px; }
.wfns-inv-date { font-size: 11px; color: #9ca3af; }
.wfns-inv-right { display: flex; align-items: center; gap: 12px; }

/* ── NOTICE (mensajes success/error en página de renovación) ──── */
.wfns-notice {
    display: none;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin: 16px 0;
    border: 1px solid;
}
.wfns-notice.wfns-success { background: #f0fdf4; border-color: #86efac; color: #166534; }
.wfns-notice.wfns-error   { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* ── DOWNLOAD LINK (historial de pagos) ────────────────────────── */
.wfns-dl-link { display: inline-flex; color: #2563eb; }
.wfns-dl-link:hover { color: #1d4ed8; }
.wfns-dl-link--off { color: #d1d5db; cursor: not-allowed; }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Contenedor principal e internos al 100% del ancho disponible, sin huecos
       laterales propios (el único separado lateral es el padding de la tarjeta). */
    .wfns-dash              { width: 100%; max-width: 100%; margin: 0; padding: 0 0 40px; }
    .wfns-dash-grid         { grid-template-columns: 1fr; gap: 14px; }
    .wfns-dash-main,
    .wfns-dash-side         { width: 100%; }
    /* Padding lateral reducido en móvil para que el contenido no quede tan metido. */
    .wfns-card              { width: 100%; box-sizing: border-box; padding: 16px 12px; }
    .wfns-sites-cols-2,
    .wfns-sites-cols-3      { grid-template-columns: 1fr; }
    .wfns-site-card         { box-sizing: border-box; max-width: 100%; }
    .wfns-profile-grid      { grid-template-columns: 1fr; }
    .wfns-domain-input-group{ flex-direction: column; }
    .wfns-plan-grid         { grid-template-columns: 1fr !important; }
    .wfns-plans-grid        { grid-template-columns: 1fr; }
    .wfns-site-actions      { flex-wrap: wrap; }
    .wfns-site-actions .wfns-btn-sm { flex: 1; justify-content: center; }
    /* La tabla de pagos mantiene sus columnas y el contenedor scrollea. */
    .wfns-billing-table     { font-size: 12px; min-width: 460px; }
    .wfns-billing-table th,
    .wfns-billing-table td  { padding: 8px 6px; }
}
/* Seguridad anti-desbordamiento general del panel */
.wfns-dash, .wfns-card { max-width: 100%; box-sizing: border-box; }
.wfns-dash * { overflow-wrap: anywhere; }
.wfns-site-name, .wfns-site-url { overflow-wrap: normal; }

/* ── FIX desbordamiento en móvil (vertical) ──────────────────────────
   Los hijos de grid/flex tienen min-width:auto por defecto y NO se
   encogen por debajo de su contenido (tabla de pagos, rejilla de planes…),
   empujando el ancho de la página → se corta a la derecha y se bloquea el
   scroll en Y. min-width:0 permite que se contraigan al ancho disponible. */
.wfns-dash-grid,
.wfns-dash-main,
.wfns-dash-side          { min-width: 0; }
.wfns-dash-main > *,
.wfns-dash-side > *,
.wfns-card               { min-width: 0; max-width: 100%; }
/* Contenedor del panel: clip horizontal SOLO aquí (no toca html/body para
   coexistir con el tema). El scroll vertical de la página sigue intacto.
   La tabla de pagos queda exenta (scrollea dentro de su propio contenedor). */
.wfns-dash { overflow-x: clip; }

/* ── Interlineado: el tema mete demasiada altura de línea. Lo forzamos. ── */
.wfns-dash, .wfns-dash *,
.wfns-login-wrap, .wfns-login-wrap * { line-height: 1.2 !important; }
