/* =========================================================
   MI PERFIL — LENGUAJE VISUAL DEL TEMA SOBRE EL PERFIL
   NATIVO DE LEARNPRESS (/lp-profile/).

   Todo el HTML de las pestañas (Mis microcredenciales, Mis
   pedidos, Mis evaluaciones, Configuración, Cerrar sesión) lo
   sigue generando LearnPress sin cambios; este archivo solo le
   da estilo. El único bloque nativo que se oculta por CSS es el
   encabezado de avatar/portada de LearnPress
   (.wrapper-profile-header), reemplazado por la tarjeta de
   usuario propia dentro de page-mi-perfil.php — no se borra
   ningún dato, solo se oculta ese bloque visual duplicado.
   ========================================================= */

/* ---------------------------------------------------------
   HERO — "Mi perfil"
   --------------------------------------------------------- */

.um-account-profile {
    background: var(--paper, #f7f9ff);
}

.um-account-profile__hero {
    width: 100%;
    padding: 54px 0 40px;
}

.um-account-profile__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    margin: 0 0 18px;

    color: var(--um-eyebrow-color, #3155ff);

    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.um-account-profile__eyebrow-line {
    display: block;
    flex: 0 0 28px;

    width: 28px;
    height: 3px;

    border-radius: 999px;

    background: var(
        --um-eyebrow-gradient,
        linear-gradient(90deg, #00d5ff 0%, #743cff 55%, #ed23bb 100%)
    );
}

.um-account-profile__title {
    margin: 0 0 32px;

    color: var(--ink, #0b1738);

    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(36px, 4.5vw, 54px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
}

.um-account-profile__title span {
    color: var(--blue, #2457ff);
    background: linear-gradient(
        100deg,
        #3155ff 5%,
        #743cff 55%,
        #ed23bb 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tarjeta de usuario */
.um-account-profile__user {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;

    padding: 22px 26px;

    background: var(--white, #ffffff);
    border: 1px solid var(--line, rgba(17, 42, 95, 0.12));
    border-radius: var(--radius-lg, 22px);
    box-shadow: var(--shadow, 0 24px 60px rgba(29, 60, 145, 0.15));
}

.um-account-profile__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.um-account-profile__user-info {
    flex: 1 1 auto;
    min-width: 0;
}

.um-account-profile__user-name {
    margin: 0;
    color: var(--ink, #0b1738);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.um-account-profile__user-email {
    margin: 2px 0 0;
    color: var(--ink-soft, #52607f);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    word-break: break-all;
}

/* Botón "Cerrar sesión" visible en la parte superior */
.um-account-profile__logout-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;

    padding: 12px 22px;

    color: #ffffff;
    background: linear-gradient(100deg, #ff2fa3 0%, #ff5a5a 100%);
    border-radius: var(--radius-sm, 12px);

    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;

    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.um-account-profile__logout-button:hover,
.um-account-profile__logout-button:focus-visible {
    box-shadow: 0 10px 24px rgba(255, 47, 163, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

/* ---------------------------------------------------------
   Ocultar el encabezado nativo de avatar/portada de
   LearnPress: la tarjeta de usuario propia lo reemplaza.
   --------------------------------------------------------- */

#learn-press-profile .wrapper-profile-header {
    display: none;
}

/* ---------------------------------------------------------
   Contenedor general del perfil nativo
   --------------------------------------------------------- */

#learn-press-profile {
    width: 100%;
    padding-bottom: 64px;

    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--ink-soft, #52607f);
}

#learn-press-profile .lp-content-area {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
}

/* ---------------------------------------------------------
   Navegación de pestañas
   --------------------------------------------------------- */

#learn-press-profile #profile-sidebar {
    flex: 0 0 240px;
    width: 240px;
}

#learn-press-profile #profile-nav {
    background: var(--white, #ffffff);
    border: 1px solid var(--line, rgba(17, 42, 95, 0.12));
    border-radius: var(--radius-lg, 22px);
    box-shadow: var(--shadow, 0 24px 60px rgba(29, 60, 145, 0.15));
    overflow: hidden;
}

#learn-press-profile .lp-profile-nav-tabs {
    margin: 0;
    padding: 10px;
    list-style: none;
}

#learn-press-profile .lp-profile-nav-tabs li {
    margin: 0 0 4px;
}

#learn-press-profile .lp-profile-nav-tabs li a {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 16px;

    color: var(--ink, #0b1738);
    border-radius: var(--radius-sm, 12px);

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    transition: background 0.15s ease, color 0.15s ease;
}

#learn-press-profile .lp-profile-nav-tabs li a:hover,
#learn-press-profile .lp-profile-nav-tabs li a:focus-visible {
    background: var(--paper, #f7f9ff);
}

#learn-press-profile .lp-profile-nav-tabs li.active > a {
    color: #ffffff;
    background: linear-gradient(100deg, #3155ff 5%, #743cff 55%, #ed23bb 100%);
}

#learn-press-profile .lp-profile-nav-tabs li .profile-tab-sections {
    margin: 4px 0 6px 30px;
    padding: 0;
    list-style: none;
}

#learn-press-profile .lp-profile-nav-tabs li .profile-tab-sections a {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
}

/* "Cerrar sesión" con tratamiento visual diferenciado dentro
   de la navegación — nunca se confunde con el resto. */
#learn-press-profile .lp-profile-nav-tabs li.logout {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line, rgba(17, 42, 95, 0.12));
}

#learn-press-profile .lp-profile-nav-tabs li.logout a {
    color: #ff2fa3;
    font-weight: 700;
}

#learn-press-profile .lp-profile-nav-tabs li.logout a:hover,
#learn-press-profile .lp-profile-nav-tabs li.logout a:focus-visible {
    background: rgba(255, 47, 163, 0.08);
}

/* ---------------------------------------------------------
   Contenido de cada pestaña
   --------------------------------------------------------- */

#learn-press-profile #profile-content {
    flex: 1 1 480px;
    min-width: 0;

    padding: 32px;

    background: var(--white, #ffffff);
    border: 1px solid var(--line, rgba(17, 42, 95, 0.12));
    border-radius: var(--radius-lg, 22px);
    box-shadow: var(--shadow, 0 24px 60px rgba(29, 60, 145, 0.15));
}

#learn-press-profile .profile-heading {
    margin: 0 0 20px;
    color: var(--ink, #0b1738);
    font-size: 20px;
    font-weight: 600;
}

/* Tablas (pedidos / microcredenciales / evaluaciones) */
#learn-press-profile .lp-list-table,
#learn-press-profile .profile-list-table {
    width: 100%;
    border-collapse: collapse;
}

#learn-press-profile .lp-list-table th,
#learn-press-profile .profile-list-table th {
    padding: 12px 14px;

    color: var(--ink-soft, #52607f);
    border-bottom: 1px solid var(--line, rgba(17, 42, 95, 0.12));

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

#learn-press-profile .lp-list-table td,
#learn-press-profile .profile-list-table td {
    padding: 14px;

    border-bottom: 1px solid var(--line, rgba(17, 42, 95, 0.12));

    font-size: 14px;
    color: var(--ink, #0b1738);
}

#learn-press-profile .lp-list-table tr:last-child td,
#learn-press-profile .profile-list-table tr:last-child td {
    border-bottom: none;
}

/* Estado del pedido — reutiliza las clases que ya imprime
   LP_Order::get_order_status_html(), solo se les da color. */
#learn-press-profile .order-status {
    display: inline-flex;
    align-items: center;

    padding: 4px 12px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
}

#learn-press-profile .order-status-pending {
    color: #9a6b00;
    background: rgba(255, 176, 32, 0.16);
}

#learn-press-profile .order-status-processing {
    color: #1536c9;
    background: rgba(36, 87, 255, 0.12);
}

#learn-press-profile .order-status-completed {
    color: #00785a;
    background: rgba(0, 201, 141, 0.16);
}

#learn-press-profile .order-status-cancelled,
#learn-press-profile .order-status-failed {
    color: #b3174a;
    background: rgba(255, 47, 163, 0.12);
}

#learn-press-profile .order-status-refunded {
    color: #52607f;
    background: rgba(82, 96, 127, 0.12);
}

/* Acciones del pedido (View / Cancel / Refund / lo que agregue
   cualquier plugin vía get_profile_order_actions()) — estilo
   genérico por atributo, sin depender de ninguna etiqueta
   específica para no romper si el texto cambia en producción. */
#learn-press-profile .column-order-actions a,
#learn-press-profile .column-order-actions span.order-action-text {
    display: inline-flex;
    align-items: center;

    margin: 0 6px 6px 0;
    padding: 6px 14px;

    border: 1px solid var(--line, rgba(17, 42, 95, 0.12));
    border-radius: var(--radius-sm, 12px);

    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink, #0b1738);

    transition: background 0.15s ease;
}

#learn-press-profile .column-order-actions a:hover,
#learn-press-profile .column-order-actions a:focus-visible {
    background: var(--paper, #f7f9ff);
}

/* Botón de acción principal (lo entrega LearnPress/plugins con
   su propia clase; se refuerza visualmente sin hardcodear el
   texto del botón). */
#learn-press-profile .lp-refund-order-action,
#learn-press-profile .column-order-actions a:first-child {
    color: #ffffff;
    background: linear-gradient(100deg, #3155ff 5%, #743cff 55%, #ed23bb 100%);
    border-color: transparent;
}

#learn-press-profile .column-order-actions a:first-child:hover,
#learn-press-profile .column-order-actions a:first-child:focus-visible {
    background: linear-gradient(100deg, #2145e0 5%, #6530e0 55%, #d81ba3 100%);
}

/* Mis microcredenciales — tarjetas de curso comprado */
#learn-press-profile .lp-course-grid,
#learn-press-profile .course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

#learn-press-profile .course-item,
#learn-press-profile .lp-course-item {
    border: 1px solid var(--line, rgba(17, 42, 95, 0.12));
    border-radius: var(--radius-md, 16px);
    overflow: hidden;
    box-shadow: var(--shadow, 0 24px 60px rgba(29, 60, 145, 0.15));
}

/* Estadísticas (solo visibles para instructor/admin — LearnPress
   ya las oculta nativamente a un alumno). */
#learn-press-profile .statistic-box {
    padding: 16px 18px;
    margin: 0 10px 10px 0;

    background: var(--paper, #f7f9ff);
    border-radius: var(--radius-sm, 12px);

    display: inline-block;
}

#learn-press-profile .statistic-box__text {
    margin: 0;
    color: var(--ink-soft, #52607f);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#learn-press-profile .statistic-box__number {
    display: block;
    margin-top: 4px;
    color: var(--ink, #0b1738);
    font-size: 24px;
    font-weight: 700;
}

/* Formularios de Configuración */
#learn-press-profile input[type="text"],
#learn-press-profile input[type="email"],
#learn-press-profile input[type="password"],
#learn-press-profile textarea,
#learn-press-profile select {
    width: 100%;
    max-width: 420px;
    padding: 10px 14px;

    border: 1px solid var(--line, rgba(17, 42, 95, 0.12));
    border-radius: var(--radius-sm, 12px);

    font-size: 14px;
    color: var(--ink, #0b1738);
}

#learn-press-profile .lp-button,
#learn-press-profile button.lp-button {
    display: inline-flex;
    align-items: center;

    padding: 12px 22px;

    color: #ffffff;
    background: linear-gradient(100deg, #3155ff 5%, #743cff 55%, #ed23bb 100%);
    border: none;
    border-radius: var(--radius-sm, 12px);

    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 900px) {
    #learn-press-profile .lp-content-area {
        flex-direction: column;
    }

    #learn-press-profile #profile-sidebar {
        flex: 1 1 auto;
        width: 100%;
    }

    #learn-press-profile .lp-profile-nav-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    #learn-press-profile .lp-profile-nav-tabs li {
        margin: 0;
    }

    #learn-press-profile #profile-content {
        padding: 22px;
    }
}

@media (max-width: 600px) {
    .um-account-profile__hero {
        padding: 36px 0 28px;
    }

    .um-account-profile__title {
        font-size: clamp(30px, 9vw, 40px);
        margin-bottom: 22px;
    }

    .um-account-profile__user {
        padding: 18px;
    }

    .um-account-profile__logout-button {
        width: 100%;
        justify-content: center;
    }

    #learn-press-profile .lp-list-table,
    #learn-press-profile .profile-list-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
