/*======= CLIENTCORE · MI CUENTA (CC_ACCOUNT_V78) =======*/
/* Mis datos, perfil, contraseña, seguridad, contactos y métodos de pago.
   Solo colores de brand.css. */

.cc-acc { font-size: 14px; color: var(--brand-ink); }

/* ---------- Cabecera de la página ---------- */
.cc-acc-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 20px 24px;
    border: 1px solid var(--brand-border);
    border-radius: 16px;
    background: linear-gradient(120deg, var(--brand-soft-1), var(--neutral-white) 70%);
}

.cc-acc-hero-ico {
    display: grid;
    flex: 0 0 50px;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--brand-primary);
    color: var(--brand-accent);
    font-size: 21px;
}

.cc-acc-hero-txt { flex: 1 1 auto; min-width: 0; }

.cc-acc-hero h2 {
    margin: 0 0 3px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--brand-dark);
}

.cc-acc-hero p { margin: 0; color: var(--brand-muted); font-size: 13.5px; line-height: 1.5; }

.cc-acc-hero-side { flex: 0 0 auto; }

/* ---------- Secciones ---------- */
.cc-acc-card {
    margin-bottom: 16px;
    border: 1px solid var(--brand-border);
    border-radius: 16px;
    background: var(--neutral-white);
}

.cc-acc-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--brand-border);
}

.cc-acc-card-ico {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--brand-soft-1);
    color: var(--brand-primary);
    font-size: 15px;
}

.cc-acc-card-head h3 {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-dark);
}

.cc-acc-card-head p { margin: 1px 0 0; color: var(--brand-muted); font-size: 12.5px; line-height: 1.45; }
.cc-acc-card-head > div { flex: 1 1 auto; min-width: 0; }
.cc-acc-card-head .cc-acc-badge { flex: 0 0 auto; }

.cc-acc-card-body { padding: 20px 22px 4px; }
.cc-acc-card-body.is-flat { padding-bottom: 20px; }

.cc-acc-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid var(--brand-border);
    border-radius: 0 0 16px 16px;
    background: var(--brand-tint);
}

.cc-acc-card-foot .cc-acc-foot-note { margin-right: auto; color: var(--brand-muted); font-size: 12.5px; }

/* Campos en dos columnas */
.cc-acc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.cc-acc-grid .is-wide { grid-column: 1 / -1; }

.cc-acc .form-group { margin-bottom: 18px; }

.cc-acc .col-form-label,
.cc-acc label.cc-acc-label {
    display: block;
    padding: 0;
    margin-bottom: 6px;
    color: var(--brand-dark);
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
}

.cc-acc .form-control:disabled { cursor: not-allowed; }

.cc-acc-help { margin-top: 5px; color: var(--brand-muted); font-size: 12px; line-height: 1.45; }

/* Campo de contraseña con ojo */
.cc-acc-pass { position: relative; }
.cc-acc-pass .form-control { padding-right: 46px; }

.cc-acc-eye {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    color: var(--brand-muted);
    cursor: pointer;
}

.cc-acc-eye:hover,
.cc-acc-eye:focus-visible { color: var(--brand-primary); }

/* ---------- Interruptores (preferencias de correo) ---------- */
.cc-acc-switches { margin: 0; padding: 0; list-style: none; }

.cc-acc-switches li { border-top: 1px solid var(--brand-border); }
.cc-acc-switches li:first-child { border-top: 0; }

.cc-acc-switch {
    display: flex !important;
    align-items: center;
    gap: 14px;
    margin: 0 !important;
    padding: 13px 0;
    color: var(--brand-ink) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    cursor: pointer;
}

.cc-acc-switch input[type="checkbox"] {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 22px;
    margin: 0;
    border-radius: 99px;
    background: var(--brand-border-6);
    cursor: pointer;
    transition: background-color .15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.cc-acc-switch input[type="checkbox"]::before {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neutral-white);
    box-shadow: 0 1px 2px rgba(var(--brand-dark-rgb), .25);
    content: "";
    transition: transform .15s ease;
}

.cc-acc-switch input[type="checkbox"]:checked { background: var(--brand-primary-600); }
.cc-acc-switch input[type="checkbox"]:checked::before { transform: translateX(18px); }
.cc-acc-switch input[type="checkbox"]:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

.cc-acc-switch small { display: block; color: var(--brand-muted); font-size: 12px; font-weight: 400; }

/* ---------- Estado (2FA, verificado...) ---------- */
.cc-acc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 99px;
    background: var(--neutral-bg-3, var(--brand-tint));
    color: var(--brand-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.cc-acc-badge::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.cc-acc-badge.is-on { background: var(--brand-soft-1); color: var(--brand-primary-600); }
.cc-acc-badge.is-warn { background: var(--state-warning-bg); color: var(--state-warning-ink); }

/* Bloque destacado (2FA) */
.cc-acc-feature {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
}

.cc-acc-feature-ico {
    display: grid;
    flex: 0 0 56px;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--state-warning-bg);
    color: var(--state-warning-ink);
    font-size: 22px;
}

.cc-acc-feature.is-on .cc-acc-feature-ico { background: var(--brand-soft-1); color: var(--brand-primary); }
.cc-acc-feature-txt { flex: 1 1 auto; min-width: 0; }
.cc-acc-feature-txt b { display: block; color: var(--brand-dark); font-size: 15px; }
.cc-acc-feature-txt p { margin: 3px 0 0; color: var(--brand-muted); font-size: 13px; line-height: 1.5; }
.cc-acc-feature .btn { flex: 0 0 auto; }

/* Lista de consejos */
.cc-acc-tips { margin: 0 0 18px; padding: 14px 16px; border-radius: 12px; background: var(--brand-tint); list-style: none; }
.cc-acc-tips li { position: relative; padding-left: 22px; color: var(--brand-ink); font-size: 12.5px; line-height: 1.8; }
.cc-acc-tips li::before { position: absolute; left: 0; color: var(--brand-primary); content: "\2713"; font-weight: 800; }

/* Botón generar contraseña junto al campo */
.cc-acc-genrow { display: flex; gap: 8px; }
.cc-acc-genrow .cc-acc-pass { flex: 1 1 auto; }
.cc-acc-genrow .btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 44px; white-space: nowrap; }

/* ---------- Barra de acciones fija ---------- */
.cc-acc-actions {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 4px 0 16px;
    padding: 12px 14px 12px 20px;
    border: 1px solid var(--brand-border);
    border-radius: 14px;
    background: var(--neutral-white);
    box-shadow: 0 8px 24px rgba(var(--brand-dark-rgb), .10);
}

.cc-acc-actions-note { display: flex; align-items: center; gap: 8px; margin-right: auto; color: var(--brand-muted); font-size: 12.5px; }
.cc-acc-actions-note i { color: var(--brand-primary); }

.cc-acc .cc-acc-actions .btn,
.cc-acc .cc-acc-card-foot .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; }

/* Alertas de WHMCS dentro de Mi cuenta */
.cc-acc .alert { margin-bottom: 16px; }

/* ---------- Contactos y métodos de pago (listas) ---------- */
.cc-acc-list { margin: 0; padding: 0; list-style: none; }

.cc-acc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    border-top: 1px solid var(--brand-border);
}

.cc-acc-item:first-child { border-top: 0; }
.cc-acc-item-ico { display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-tint); color: var(--brand-primary); font-size: 16px; }
.cc-acc-item-txt { flex: 1 1 auto; min-width: 0; }
.cc-acc-item-txt b { display: block; overflow: hidden; color: var(--brand-dark); text-overflow: ellipsis; white-space: nowrap; }
.cc-acc-item-txt small { color: var(--brand-muted); font-size: 12.5px; }
.cc-acc-item-btns { display: flex; flex: 0 0 auto; gap: 6px; }

/* ---------- Móvil ---------- */
@media (max-width: 767.98px) {
    .cc-acc-hero { padding: 16px; }
    .cc-acc-hero-ico { flex-basis: 42px; width: 42px; height: 42px; font-size: 18px; }
    .cc-acc-hero h2 { font-size: 18px; }
    .cc-acc-hero-side { display: none; }
    .cc-acc-card-head { padding: 14px 16px; }
    .cc-acc-card-body { padding: 16px 16px 2px; }
    .cc-acc-card-body.is-flat { padding-bottom: 16px; }
    .cc-acc-card-foot { padding: 12px 16px; }
    .cc-acc-grid { grid-template-columns: 1fr; }
    .cc-acc-feature { flex-wrap: wrap; padding: 16px; }
    .cc-acc-feature .btn { width: 100%; }
    .cc-acc-genrow { flex-wrap: wrap; }
    .cc-acc-genrow .btn { width: 100%; justify-content: center; }
    .cc-acc-actions { bottom: 8px; padding: 10px; }
    .cc-acc-actions-note { display: none; }
    .cc-acc-actions .btn { flex: 1 1 0; }
    .cc-acc-item { flex-wrap: wrap; padding: 14px 16px; }
    .cc-acc-item-btns { width: 100%; padding-left: 54px; }
}

/* Estados ocultos por WHMCS (2FA): ganan a los display de las tarjetas */
.cc-acc .twofa-config-link.w-hidden { display: none !important; }

/* Selector de contactos */
.cc-acc-picker { display: flex; align-items: flex-end; gap: 14px; padding: 16px 22px; }
.cc-acc-picker .cc-acc-card-ico { margin-bottom: 4px; }
.cc-acc-picker-field { flex: 1 1 auto; min-width: 0; }
.cc-acc-picker .btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; white-space: nowrap; }

/* Botón eliminar (contorno rojo) */
.cc-acc .cc-acc-btn-danger { border: 1px solid var(--state-danger-border); background: var(--neutral-white); color: var(--state-danger); }
.cc-acc .cc-acc-btn-danger:hover,
.cc-acc .cc-acc-btn-danger:focus { border-color: var(--state-danger); background: var(--state-danger-bg); color: var(--state-danger); }

@media (max-width: 767.98px) {
    .cc-acc-picker { flex-wrap: wrap; padding: 14px 16px; }
    .cc-acc-picker .cc-acc-card-ico { display: none; }
    .cc-acc-picker-field, .cc-acc-picker .btn { width: 100%; justify-content: center; }
    .cc-acc-actions .cc-acc-btn-danger { flex-basis: 100%; order: 3; }
}

/* Lista vacía */
.cc-acc-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 22px; text-align: center; }
.cc-acc-empty .cc-acc-item-ico { margin-bottom: 6px; }
.cc-acc-empty b { color: var(--brand-dark); }
.cc-acc-empty small { color: var(--brand-muted); font-size: 12.5px; }
.cc-acc-item-btns .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; }

/* Formulario de tarjeta de WHMCS */
.cc-acc-paycard { border-radius: 16px; }

/* CC_MYDATA_V111: tarjeta "Tus datos personales" */
.cc-mydata { margin-top: 18px; }
.cc-mydata-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--brand-border); }
.cc-mydata-row:first-of-type { border-top: 0; padding-top: 4px; }
.cc-mydata-row > div { flex: 1 1 auto; min-width: 0; }
.cc-mydata-row b { display: block; font-size: 14px; color: var(--brand-ink); }
.cc-mydata-row span { font-size: 12.5px; color: var(--brand-muted); line-height: 1.45; }
.cc-mydata-row span a { color: var(--brand-primary); }
.cc-mydata-row .btn { flex: 0 0 auto; white-space: nowrap; }
.cc-mydata-note { margin: 10px 0 0; font-size: 12.5px; color: var(--brand-muted); }
@media (max-width: 575px) {
    .cc-mydata-row { flex-direction: column; align-items: stretch; gap: 8px; }
    .cc-mydata-row .btn { align-self: flex-start; }
}
