/*
 * ============================================================
 * NOYTRIX PROFILE — INTERNAL BALANCE V79
 *
 * V78 GEOMETRY IS NOT TOUCHED.
 *
 * Changes:
 * - ecosystem grows vertically
 * - product cards become larger
 * - Open activity aligns with Security
 * - bottom keys notice icon is fixed
 * ============================================================
 */


/* ============================================================
   1. OVERVIEW USES AVAILABLE PROFILE HEIGHT
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-overview.nx-p79-active:not([hidden]) {

    width: 100% !important;

    min-height:
      calc(100% - 58px)
      !important;

    height:
      calc(100% - 58px)
      !important;

    display: flex !important;

    flex-direction: column !important;

    gap: 10px !important;

    box-sizing: border-box !important;
}


/* ============================================================
   2. TOP ACTIVITY + SECURITY CARDS
   SAME HEIGHT / SAME INTERNAL BEHAVIOUR
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-equal-card {

    display: flex !important;

    flex-direction: column !important;

    min-height: 205px !important;

    height: 100% !important;

    box-sizing: border-box !important;
}


/*
 * Child that contains the action button is pushed
 * to the bottom of the card.
 */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-action-wrap {

    width: 100% !important;

    margin-top: auto !important;

    padding-top: 10px !important;

    box-sizing: border-box !important;
}


body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-action-button {

    width: 100% !important;

    min-height: 44px !important;
    height: 44px !important;

    margin: 0 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    padding:
      0 14px
      !important;

    font-size: 14px !important;

    font-weight: 800 !important;

    line-height: 1 !important;

    box-sizing: border-box !important;
}


/* ============================================================
   3. ECOSYSTEM — GROW INTO FREE SPACE
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-ecosystem {

    width: 100% !important;

    min-width: 0 !important;

    /*
     * This is the important part:
     * consume remaining vertical space.
     */

    flex:
      1 1 auto
      !important;

    min-height: 250px !important;

    display: flex !important;

    flex-direction: column !important;

    padding:
      14px
      !important;

    box-sizing: border-box !important;

    overflow: hidden !important;
}


/* Heading slightly larger */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-ecosystem h2,

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-ecosystem h3 {

    font-size: 20px !important;

    line-height: 1.15 !important;
}


/* ============================================================
   4. PRODUCT ROW
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-product-row {

    width: 100% !important;

    min-width: 0 !important;

    flex:
      1 1 auto
      !important;

    min-height: 105px !important;

    display: grid !important;

    grid-template-columns:
      repeat(5, minmax(0, 1fr))
      !important;

    grid-auto-rows:
      minmax(94px, 1fr)
      !important;

    gap: 10px !important;

    align-items: stretch !important;

    margin:
      12px 0 10px
      !important;

    box-sizing: border-box !important;
}


/* ============================================================
   5. BIGGER PRODUCT CARDS
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-product-card {

    width: 100% !important;

    min-width: 0 !important;

    height: 100% !important;

    min-height: 94px !important;

    padding:
      13px 14px
      !important;

    display: flex !important;

    align-items: center !important;

    gap: 12px !important;

    box-sizing: border-box !important;

    border-radius: 10px !important;
}


/*
 * Product icon boxes.
 */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-product-card
svg {

    max-width: 22px !important;
    max-height: 22px !important;
}


/*
 * Product text.
 */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-product-card strong {

    font-size: 13px !important;

    line-height: 1.15 !important;
}


body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-product-card small,

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-product-card span {

    line-height: 1.2 !important;
}


/* ============================================================
   6. MANAGE CONNECTIONS BUTTON
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-ecosystem
.nx-p79-manage-connections {

    width: 100% !important;

    min-height: 46px !important;
    height: 46px !important;

    flex:
      0 0 46px
      !important;

    margin-top: auto !important;

    font-size: 14px !important;

    font-weight: 800 !important;

    box-sizing: border-box !important;
}


/* ============================================================
   7. BOTTOM "YOUR KEYS STAY YOURS"
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-keys-note {

    width: 100% !important;

    min-height: 58px !important;

    flex:
      0 0 58px
      !important;

    margin-top: 0 !important;

    padding:
      9px 14px
      !important;

    display: flex !important;

    align-items: center !important;

    box-sizing: border-box !important;

    overflow: hidden !important;
}


/* ============================================================
   8. SHIELD ICON FIX
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-keys-icon {

    position: relative !important;

    width: 34px !important;
    height: 34px !important;

    min-width: 34px !important;
    min-height: 34px !important;

    max-width: 34px !important;
    max-height: 34px !important;

    flex:
      0 0 34px
      !important;

    margin-right: 10px !important;

    display: grid !important;

    place-items: center !important;

    box-sizing: border-box !important;

    overflow: hidden !important;
}


/*
 * Force shield/check SVG completely inside its box.
 */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-keys-icon svg {

    display: block !important;

    width: 19px !important;
    height: 19px !important;

    min-width: 19px !important;
    min-height: 19px !important;

    max-width: 19px !important;
    max-height: 19px !important;

    margin: 0 !important;

    position: static !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    transform:
      translate(0, 0)
      !important;

    overflow: hidden !important;
}


/*
 * Any check or nested icon also stays centered.
 */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-keys-icon
svg * {

    transform-origin:
      center !important;
}


/* ============================================================
   9. KEYS TEXT
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-keys-note strong {

    font-size: 12px !important;

    line-height: 1.15 !important;
}


body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-keys-note small,

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-keys-note p {

    font-size: 10px !important;

    line-height: 1.2 !important;
}


/* ============================================================
   10. SAFETY
   ============================================================ */

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-ecosystem *,

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-equal-card *,

body.nx-profile-v78-open
.nx-profile-v78-root
.nx-p79-keys-note * {

    box-sizing: border-box;
}
