/*
 * Boroń Market – YITH WooCommerce Points & Rewards
 * Scoped to YITH Points & Rewards elements inside My Account.
 */

.woocommerce-MyAccount-content {
  --bm-orange: #ffad14;
  --bm-orange-dark: #f39b00;
  --bm-pink: #e64bc5;
  --bm-purple: #7d78ff;
  --bm-text: #34343a;
  --bm-muted: #777b84;
  --bm-border: #ececf1;
  --bm-soft: #fafafd;
  --bm-shadow: 0 10px 30px rgba(37, 38, 45, .06);
  --bm-radius: 16px;
}

/* Nagłówek strony */
.woocommerce-MyAccount-content > h1,
.woocommerce-MyAccount-content > h2:first-child,
.woocommerce-MyAccount-content .ywpar_myaccount_title {
  color: var(--bm-text);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 26px;
}

/* Karta salda */
.woocommerce-MyAccount-content .ywpar_myaccount_entry_info {
  gap: 18px;
  margin-bottom: 30px;
}

.woocommerce-MyAccount-content .ywpar_myaccount_entry_info > div {
  position: relative;
  min-width: 235px;
  margin: 0;
  padding: 24px 22px;
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  background: linear-gradient(145deg, #fff 0%, #fbf9ff 100%);
  box-shadow: var(--bm-shadow);
  overflow: hidden;
}

.woocommerce-MyAccount-content .ywpar_myaccount_entry_info > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--bm-orange), var(--bm-pink), var(--bm-purple));
}

.woocommerce-MyAccount-content .ywpar_myaccount_entry_info .ywpar_entry_info_title {
  color: var(--bm-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}

.woocommerce-MyAccount-content .ywpar_myaccount_entry_info .points_collected,
.woocommerce-MyAccount-content .ywpar_myaccount_entry_info .rank {
  color: var(--bm-text);
  font-size: 38px;
  line-height: 1.05;
  font-weight: 700;
  margin-top: 10px;
}

.woocommerce-MyAccount-content .ywpar_myaccount_entry_info .points_worth {
  color: var(--bm-text);
  font-size: 13px;
  margin-top: 8px;
}

.woocommerce-MyAccount-content .ywpar_myaccount_entry_info .ywpar_total_collected_title,
.woocommerce-MyAccount-content .ywpar_myaccount_entry_info .ywpar_to_redeem_title {
  color: var(--bm-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

/* Zakładki */
.woocommerce-MyAccount-content .ywpar_tabs,
.woocommerce-MyAccount-content .ywpar_tabs_container,
.woocommerce-MyAccount-content ul.ywpar_tabs {
  border-bottom: 1px solid var(--bm-border);
  margin: 8px 0 28px;
  gap: 8px;
}

.woocommerce-MyAccount-content .ywpar_tabs a,
.woocommerce-MyAccount-content .ywpar_tabs li a,
.woocommerce-MyAccount-content .ywpar_tabs_container a {
  position: relative;
  color: #8b8d94 !important;
  font-weight: 600;
  text-decoration: none !important;
  padding: 13px 17px !important;
  border-radius: 10px 10px 0 0;
  transition: color .2s ease, background .2s ease;
}

.woocommerce-MyAccount-content .ywpar_tabs a:hover,
.woocommerce-MyAccount-content .ywpar_tabs li.active a,
.woocommerce-MyAccount-content .ywpar_tabs .active a,
.woocommerce-MyAccount-content .ywpar_tabs a.active {
  color: var(--bm-text) !important;
  background: linear-gradient(180deg, rgba(255,173,20,.08), transparent);
}

.woocommerce-MyAccount-content .ywpar_tabs li.active a::after,
.woocommerce-MyAccount-content .ywpar_tabs .active a::after,
.woocommerce-MyAccount-content .ywpar_tabs a.active::after {
  content: "";
  position: absolute;
  height: 3px;
  left: 14px;
  right: 14px;
  bottom: -1px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--bm-orange), var(--bm-pink), var(--bm-purple));
}

/* Historia punktów */
.woocommerce-MyAccount-content table.ywpar_points_rewards,
.woocommerce-MyAccount-content .ywpar_points_rewards {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--bm-border) !important;
  border-radius: 14px;
  border-collapse: separate !important;
  border-spacing: 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(37, 38, 45, .04);
}

.woocommerce-MyAccount-content .ywpar_points_rewards thead th {
  background: #fbfbfd;
  color: var(--bm-text);
  font-size: 13px;
  font-weight: 700;
  padding: 15px 16px !important;
  border-bottom: 1px solid var(--bm-border) !important;
}

.woocommerce-MyAccount-content .ywpar_points_rewards tbody td {
  color: #64676f;
  padding: 16px !important;
  border-bottom: 1px solid #f0f0f3 !important;
  background: #fff;
}

.woocommerce-MyAccount-content .ywpar_points_rewards tbody tr:last-child td {
  border-bottom: 0 !important;
}

.woocommerce-MyAccount-content .ywpar_points_rewards tbody tr:hover td {
  background: #fcfbff;
}

.woocommerce-MyAccount-content .ywpar_points_rewards .ywpar_plus {
  color: #3aa568 !important;
  font-weight: 700;
}

.woocommerce-MyAccount-content .ywpar_points_rewards .ywpar_minus {
  color: #d94b5e !important;
  font-weight: 700;
}

.woocommerce-MyAccount-content .ywpar_points_rewards a {
  color: var(--bm-orange-dark) !important;
  font-weight: 600;
}

/* Cele / sposoby zdobywania punktów */
.woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner,
.woocommerce-MyAccount-content #ywpar_banner.getpoints_banner {
  position: relative;
  padding: 24px 28px !important;
  margin-bottom: 18px !important;
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius) !important;
  background: linear-gradient(135deg, #fff 0%, #fff8f4 50%, #fbf8ff 100%) !important;
  box-shadow: 0 8px 26px rgba(37, 38, 45, .045);
  overflow: hidden;
}

.woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--bm-orange), var(--bm-pink), var(--bm-purple));
}

.woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner.with_image {
  padding-left: 92px !important;
}

.woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner.with_image img.banner_image {
  max-width: 48px;
  top: 24px;
  left: 24px;
}

.woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner .banner_header h3 {
  color: var(--bm-text) !important;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 6px;
}

.woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner .banner_header h4 {
  color: #686b73 !important;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
}

.woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner a {
  color: var(--bm-orange-dark) !important;
  font-weight: 600;
}

/* Pasek postępu */
.woocommerce-MyAccount-content #ywpar_progress_bar .pbar_back {
  background: #eeeef4 !important;
  height: 10px !important;
}

.woocommerce-MyAccount-content #ywpar_progress_bar .pbar_fill {
  background: linear-gradient(90deg, var(--bm-orange), var(--bm-pink), var(--bm-purple)) !important;
}

.woocommerce-MyAccount-content #ywpar_progress_bar .step,
.woocommerce-MyAccount-content #ywpar_progress_bar .step.final_step {
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(37, 38, 45, .12);
}

.woocommerce-MyAccount-content #ywpar_progress_bar .pbar_fill .step {
  background: var(--bm-orange) !important;
}

.woocommerce-MyAccount-content #ywpar_banner #ywpar_progress_bar .step > span,
.woocommerce-MyAccount-content #ywpar_banner #ywpar_progress_bar .step_points {
  color: #777b84 !important;
}

/* Link polecający */
.woocommerce-MyAccount-content #ywpar-copy-to-clipboard-wrapper {
  max-width: 470px;
  border: 1px solid var(--bm-border);
  border-radius: 10px;
  min-height: 44px;
  box-shadow: 0 3px 12px rgba(37, 38, 45, .03);
}

.woocommerce-MyAccount-content #ywpar-copy-to-clipboard-wrapper .ywpar-copy-to-clipboard__copy {
  color: var(--bm-text);
  padding: 7px 9px;
}

.woocommerce-MyAccount-content #ywpar-copy-to-clipboard-wrapper .ywpar-copy-to-clipboard__copy:hover {
  color: var(--bm-orange-dark);
  background: #fff8ed;
}

/* Recenzje / produkty w bannerach */
.woocommerce-MyAccount-content .getpoints_banner.enable_review_exp .product {
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,.05);
}

.woocommerce-MyAccount-content .getpoints_banner.enable_review_exp .product:first-of-type {
  border-top: 0;
}

/* Formularz udostępniania punktów */
.woocommerce-MyAccount-content #share_points {
  background: linear-gradient(145deg, #fff, #fbf9ff);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  box-shadow: var(--bm-shadow);
}

.woocommerce-MyAccount-content #share_points input,
.woocommerce-MyAccount-content #share_points select {
  border-radius: 10px !important;
  border: 1px solid #dddde4 !important;
}

.woocommerce-MyAccount-content #share_points input#ywpar-share-points__submit {
  border: 0 !important;
  border-radius: 10px !important;
  color: #fff !important;
  background: linear-gradient(90deg, var(--bm-orange), var(--bm-pink), var(--bm-purple)) !important;
  box-shadow: 0 8px 20px rgba(230, 75, 197, .18);
}

/* Ogólne przyciski związane z YWPAR */
.woocommerce-MyAccount-content [class*="ywpar"] .button,
.woocommerce-MyAccount-content [id*="ywpar"] .button,
.woocommerce-MyAccount-content button[class*="ywpar"] {
  border-radius: 10px !important;
}

/* Mobile */
@media (max-width: 768px) {
  .woocommerce-MyAccount-content .ywpar_myaccount_entry_info {
    display: grid;
    grid-template-columns: 1fr;
  }

  .woocommerce-MyAccount-content .ywpar_myaccount_entry_info > div {
    min-width: 0;
    width: 100%;
  }

  .woocommerce-MyAccount-content .ywpar_tabs,
  .woocommerce-MyAccount-content .ywpar_tabs_container,
  .woocommerce-MyAccount-content ul.ywpar_tabs {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
  }

  .woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner,
  .woocommerce-MyAccount-content #ywpar_banner.getpoints_banner {
    padding: 20px !important;
  }

  .woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner.with_image {
    padding-left: 78px !important;
  }

  .woocommerce-MyAccount-content .ywpar_tabcontent #ywpar_banner.with_image img.banner_image {
    left: 18px;
    top: 20px;
    max-width: 42px;
  }

  .woocommerce-MyAccount-content .ywpar_points_rewards thead {
    display: none;
  }
}

/* v1.0.1 — mniejszy tytuł "Saldo Punktów" w sekcji Moje punkty */
.woocommerce-MyAccount-content .ywpar-wrapper > h2 {
  font-size: 38px !important;
  line-height: 1.15 !important;
  font-weight: 500 !important;
  margin: 0 0 20px !important;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .woocommerce-MyAccount-content .ywpar-wrapper > h2 {
    font-size: 30px !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
  }
}
