/* ======================================================================
   KINDRED — MON COMPTE
   MOYENS DE PAIEMENT

   Même style que le tableau des commandes (kindred-account-orders.css),
   adapté aux classes de cette page.
   ====================================================================== */


/* ---------------------------------------------------------
   Tableau des moyens de paiement — styles communs
   --------------------------------------------------------- */

body.logged-in.woocommerce-account
.kindred-my-account
table.woocommerce-MyAccount-paymentMethods {
  width: 100% !important;
  margin: 0 !important;
  background-color: #FFFFFF !important;
  border: 1px solid #DDD6CD !important;
  border-collapse: separate !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}


/* =========================================================
   KINDRED — MOYENS DE PAIEMENT — DESKTOP
   ========================================================= */

@media (min-width: 981px) {

  /* ---------------------------------------------------------
      En-tête du tableau
     --------------------------------------------------------- */

  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods thead th {
    background-color: #F0EBE4 !important;
    color: #6F675E !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    text-align: left !important;
    vertical-align: middle !important;
    padding: 14px 20px 0 !important;
  }


  /* ---------------------------------------------------------
      Cellules du tableau
     --------------------------------------------------------- */

  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods td {
    padding: 4px 8px !important;
    font-size: 18px !important;
    color: #6F675E !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
  }


  /* ---------------------------------------------------------
     Retirer la dernière bordure horizontale
     --------------------------------------------------------- */

  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods tbody tr:last-child td {
    border-bottom: 0 !important;
  }


  /* ---------------------------------------------------------
     Bouton « Supprimer »
     --------------------------------------------------------- */

  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 20px !important;
    background-color: #1F1F1F !important;
    border: 1px solid #1F1F1F !important;
    border-radius: 0 !important;
    color: #F6F3EE !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition:
      background-color 0.2s ease,
      border-color 0.2s ease !important;
  }

  /* Survol et focus du bouton */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete:hover,
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete:focus {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #F6F3EE !important;
  }

  /* Supprimer l'icône ajoutée par Divi */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete::before,
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete::after,
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete:hover::before,
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete:hover::after {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    content: none !important;
    opacity: 0 !important;
  }


  /* ---------------------------------------------------------
     Bouton « Ajouter un moyen de paiement »
     --------------------------------------------------------- */

  body.logged-in.woocommerce-account
  .kindred-my-account
  .woocommerce-MyAccount-content
  > a.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 24px 0 0 !important;
    padding: 12px 24px !important;
    background-color: #1F1F1F !important;
    border: 1px solid #1F1F1F !important;
    border-radius: 0 !important;
    color: #FCF5EC !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: none !important;
  }

  /* Survol et focus du bouton */
  body.logged-in.woocommerce-account
  .kindred-my-account
  .woocommerce-MyAccount-content
  > a.button:hover,
  body.logged-in.woocommerce-account
  .kindred-my-account
  .woocommerce-MyAccount-content
  > a.button:focus {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #FCF5EC !important;
  }

  /* Supprimer l'icône ajoutée par Divi */
  body.logged-in.woocommerce-account
  .kindred-my-account
  .woocommerce-MyAccount-content
  > a.button::before,
  body.logged-in.woocommerce-account
  .kindred-my-account
  .woocommerce-MyAccount-content
  > a.button::after {
    display: none !important;
    content: none !important;
  }

}


/* =========================================================
   KINDRED — MOYENS DE PAIEMENT TABLETTE + MOBILE
   Chaque moyen de paiement présenté sous forme de carte
   ========================================================= */

@media (max-width: 980px) {

  /* Transformer le tableau en conteneur de cartes */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods {
    display: block !important;
    background-color: transparent !important;
    border: 0 !important;
  }

  /* Masquer l'en-tête desktop */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  thead {
    display: none !important;
  }

  /* Transformer le corps du tableau en conteneur pleine largeur */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  tbody {
    display: block !important;
    width: 100% !important;
  }

  /* Carte individuelle de chaque moyen de paiement */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  tbody tr {
    display: block !important;
    width: 100% !important;
    margin: 0 0 16px !important;
    background-color: #FFFFFF !important;
    border: 1px solid #DDD6CD !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  tbody tr:last-child {
    margin-bottom: 0 !important;
  }

  /* Cellules de chaque carte */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  td {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 18px !important;
    color: #1F1F1F !important;
    text-align: right !important;
    border: 0 !important;
    border-top: 1px solid #DDD6CD !important;
    box-sizing: border-box !important;
  }

  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  tr td:first-child {
    border-top: 0 !important;
  }

  /* Titres générés dans les cellules (Méthode / Expiration) */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  td::before {
    color: #1F1F1F !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
  }

  /* Cellule des actions */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  td.woocommerce-PaymentMethod--actions::before {
    display: none !important;
    content: none !important;
  }

  /* Bouton « Supprimer », pleine largeur */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    background-color: #1F1F1F !important;
    border: 1px solid #1F1F1F !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #FCF5EC !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
  }

  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete:hover,
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete:focus {
    background-color: #333333 !important;
    border-color: #333333 !important;
    color: #FCF5EC !important;
  }

  /* Retirer l'icône ajoutée par Divi */
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete::before,
  body.logged-in.woocommerce-account
  .kindred-my-account
  table.woocommerce-MyAccount-paymentMethods
  a.button.delete::after {
    display: none !important;
    content: none !important;
  }

  /* Bouton « Ajouter », pleine largeur */
  body.logged-in.woocommerce-account
  .kindred-my-account
  .woocommerce-MyAccount-content
  > a.button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 44px !important;
    margin: 16px 0 0 !important;
    padding: 12px 16px !important;
    background-color: #1F1F1F !important;
    border: 1px solid #1F1F1F !important;
    border-radius: 8px !important;
    color: #FCF5EC !important;
    font-size: 17px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
  }

  body.logged-in.woocommerce-account
  .kindred-my-account
  .woocommerce-MyAccount-content
  > a.button:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
  }

  body.logged-in.woocommerce-account
  .kindred-my-account
  .woocommerce-MyAccount-content
  > a.button::before,
  body.logged-in.woocommerce-account
  .kindred-my-account
  .woocommerce-MyAccount-content
  > a.button::after {
    display: none !important;
    content: none !important;
  }

}