/*
 * Boroń Market – Affiliate Dashboard Style v0.2.0
 * Scope: YITH WooCommerce Affiliates frontend dashboard + registration states
 */

.yith-wcaf-dashboard,
.yith-wcaf-registration-form {
  --yith-wcaf-dashboard--accent-color: #f6a400;
  --yith-wcaf-dashboard--color: #2f3037;
  --yith-wcaf-dashboard--border-color: #ececf1;
  --yith-wcaf-dashboard--border-radius: 16px;
  --yith-wcaf-background-color: #fffaf6;
  --yith-wcaf-border--radius: 10px;
  color: #2f3037;
}

/* =========================
   PANEL PARTNERA
   ========================= */
.woocommerce-MyAccount-content .yith-wcaf-dashboard {
  background: #fff;
}

.yith-wcaf-dashboard ul.yith-wcaf-dashboard-navigation {
  display: flex;
  gap: 8px;
  margin-bottom: 34px;
  padding: 6px;
  border: 1px solid #efeff3;
  border-radius: 14px;
  background: #fafafa;
  overflow-x: auto;
  scrollbar-width: thin;
}

.yith-wcaf-dashboard ul.yith-wcaf-dashboard-navigation::after { display: none; }
.yith-wcaf-dashboard ul.yith-wcaf-dashboard-navigation li { flex: 0 0 auto; border: 0 !important; }
.yith-wcaf-dashboard ul.yith-wcaf-dashboard-navigation li a {
  padding: 11px 16px;
  border-radius: 10px;
  color: #41424a;
  font-weight: 600;
  line-height: 1.2;
  transition: .2s ease;
}
.yith-wcaf-dashboard ul.yith-wcaf-dashboard-navigation li a:hover {
  color: #b45b00;
  background: #fff3df;
}
.yith-wcaf-dashboard ul.yith-wcaf-dashboard-navigation li.is-active a {
  color: #fff !important;
  background: linear-gradient(100deg, #ffb12a 0%, #ef8fb5 48%, #8f83ff 100%);
  box-shadow: 0 8px 22px rgba(152, 111, 205, .16);
}

.yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats {
  gap: 22px;
  margin-bottom: 54px;
}
.yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats .stat-box {
  background: #fff;
  border: 1px solid #ececf1;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(32, 37, 52, .06);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats .stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(32, 37, 52, .09);
}
.yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats .stat-box .stat-item {
  padding: 14px 22px;
  border-bottom: 1px solid #f0f0f3;
}
.yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats .stat-box .stat-item.highlight {
  padding: 24px 20px;
  border-radius: 0;
  background: linear-gradient(135deg, #fff8ee 0%, #fff 58%, #faf8ff 100%);
}
.yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats .stat-box .stat-item.large {
  padding: 28px 22px;
}
.yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats .stat-box .stat-item .stat-label {
  color: #5b5d66;
  font-weight: 700;
}
.yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats .stat-box .stat-item.large .stat-label {
  color: #bd6800;
}
.yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats .stat-box .stat-item.large .stat-value {
  color: #2f3037;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -.03em;
}

.yith-wcaf-dashboard .dashboard-title h3,
.yith-wcaf-dashboard h2,
.yith-wcaf-dashboard h3,
.yith-wcaf-dashboard h4 { color: #2e3038; }
.yith-wcaf-dashboard .dashboard-title h3 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.yith-wcaf-dashboard table.yith-wcaf-table,
.yith-wcaf-dashboard table {
  width: 100%;
  overflow: hidden;
  border: 1px solid #ececf1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 37, 52, .04);
}
.yith-wcaf-dashboard table thead th {
  background: #fafafa;
  color: #464851;
  font-weight: 700;
  border-bottom: 1px solid #ececf1;
}
.yith-wcaf-dashboard table th,
.yith-wcaf-dashboard table td { padding: 14px 16px; }
.yith-wcaf-dashboard table tbody tr:hover td { background: #fffaf4; }

.yith-wcaf-dashboard input[type="text"],
.yith-wcaf-dashboard input[type="email"],
.yith-wcaf-dashboard input[type="url"],
.yith-wcaf-dashboard input[type="number"],
.yith-wcaf-dashboard input[type="password"],
.yith-wcaf-dashboard select,
.yith-wcaf-dashboard textarea,
.yith-wcaf-dashboard .select2-selection,
.yith-wcaf-registration-form input[type="text"],
.yith-wcaf-registration-form input[type="email"],
.yith-wcaf-registration-form input[type="url"],
.yith-wcaf-registration-form input[type="number"],
.yith-wcaf-registration-form input[type="password"],
.yith-wcaf-registration-form select,
.yith-wcaf-registration-form textarea {
  min-height: 44px;
  border: 1px solid #dddde5 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}
.yith-wcaf-dashboard input:focus,
.yith-wcaf-dashboard select:focus,
.yith-wcaf-dashboard textarea:focus,
.yith-wcaf-registration-form input:focus,
.yith-wcaf-registration-form select:focus,
.yith-wcaf-registration-form textarea:focus {
  outline: none;
  border-color: #f3ad3c !important;
  box-shadow: 0 0 0 3px rgba(246, 164, 0, .12) !important;
}

.yith-wcaf-dashboard .button,
.yith-wcaf-dashboard button,
.yith-wcaf-dashboard input[type="submit"],
.yith-wcaf-registration-form .button,
.yith-wcaf-registration-form button,
.yith-wcaf-registration-form input[type="submit"] {
  border: 0 !important;
  border-radius: 10px !important;
  background: linear-gradient(100deg, #ffb12a 0%, #ef8fb5 48%, #8f83ff 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 20px rgba(152, 111, 205, .16) !important;
  transition: .2s ease !important;
}
.yith-wcaf-dashboard .button:hover,
.yith-wcaf-dashboard button:hover,
.yith-wcaf-dashboard input[type="submit"]:hover,
.yith-wcaf-registration-form .button:hover,
.yith-wcaf-registration-form button:hover,
.yith-wcaf-registration-form input[type="submit"]:hover {
  transform: translateY(-1px);
  filter: saturate(1.04) brightness(.99);
  box-shadow: 0 11px 25px rgba(152, 111, 205, .22) !important;
}

.yith-wcaf-dashboard a:not(.button) { color: #d37a00; }
.yith-wcaf-dashboard a:not(.button):hover { color: #a95200; }
.yith-wcaf-dashboard .yith-wcaf-table-top-bar {
  padding: 14px;
  border: 1px solid #efeff3;
  border-radius: 12px;
  background: #fafafa;
}
.yith-wcaf-dashboard .woocommerce-message,
.yith-wcaf-dashboard .woocommerce-info,
.yith-wcaf-dashboard .woocommerce-error { border-radius: 12px; }

/* =========================
   EKRAN PRZED DOŁĄCZENIEM
   ========================= */
.woocommerce-MyAccount-content .yith-wcaf-registration-form {
  --yith-wcaf-background-color: transparent;
  width: 100%;
}

.yith-wcaf-registration-form .become-an-affiliate-form,
.yith-wcaf-registration-form .already-an-affiliate-wrapper,
.yith-wcaf-registration-form .pending-request-wrapper,
.yith-wcaf-registration-form .rejected-request-wrapper {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 64px;
  overflow: hidden;
  border: 1px solid #eeeef3;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(143,131,255,.12), transparent 35%),
    radial-gradient(circle at 0% 100%, rgba(255,177,42,.12), transparent 38%),
    #fff;
  box-shadow: 0 18px 46px rgba(33, 37, 51, .07);
  text-align: center;
}

.yith-wcaf-registration-form .become-an-affiliate-form::before {
  content: "Program partnerski";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 7px 13px;
  border-radius: 999px;
  background: linear-gradient(100deg, rgba(255,177,42,.13), rgba(239,143,181,.13), rgba(143,131,255,.13));
  color: #b45b00;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

.yith-wcaf-registration-form .become-an-affiliate-form > p:first-child {
  max-width: 560px;
  margin: 0 auto 24px;
  color: #2f3037;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
}

.yith-wcaf-registration-form .become-an-affiliate-form::after {
  content: "Polecaj usługi i produkty Boroń Market. Po dołączeniu zyskasz własny panel, linki polecające oraz podgląd prowizji i wyników.";
  display: block;
  max-width: 600px;
  margin: 18px auto 0;
  color: #747680;
  font-size: 14px;
  line-height: 1.65;
}

.yith-wcaf-registration-form .become-an-affiliate-form .become-an-affiliate {
  width: min(100%, 430px) !important;
  min-height: 50px;
  margin: 0 auto !important;
  padding: 14px 24px !important;
  font-size: 15px !important;
}

/* pełny formularz zgłoszenia po kliknięciu */
.yith-wcaf-registration-form .forms-container {
  gap: 28px;
}
.yith-wcaf-registration-form .register-form,
.yith-wcaf-registration-form .login-form {
  padding: 28px;
  border: 1px solid #eeeef3 !important;
  border-radius: 16px;
  background: #fff !important;
  box-shadow: 0 10px 30px rgba(32,37,52,.05);
}
.yith-wcaf-registration-form .register-form h2,
.yith-wcaf-registration-form .register-form h3,
.yith-wcaf-registration-form .login-form h2,
.yith-wcaf-registration-form .login-form h3 {
  color: #2f3037;
}
.yith-wcaf-registration-form p.form-row label {
  color: #3f4149;
  font-weight: 600;
}

/* stany oczekujący / odrzucony / już partner */
.yith-wcaf-registration-form .pending-request-wrapper,
.yith-wcaf-registration-form .already-an-affiliate-wrapper,
.yith-wcaf-registration-form .rejected-request-wrapper {
  color: #42444c;
}
.yith-wcaf-registration-form h3.thank-you,
.yith-wcaf-registration-form h3.we-are-sorry {
  color: #2f3037;
  font-weight: 700;
}

/* Responsywność */
@media (max-width: 900px) {
  .yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .yith-wcaf-dashboard ul.yith-wcaf-dashboard-navigation { margin-bottom: 24px; }
  .yith-wcaf-registration-form .become-an-affiliate-form,
  .yith-wcaf-registration-form .already-an-affiliate-wrapper,
  .yith-wcaf-registration-form .pending-request-wrapper,
  .yith-wcaf-registration-form .rejected-request-wrapper {
    padding: 42px 30px;
  }
}

@media (max-width: 600px) {
  .yith-wcaf-dashboard ul.yith-wcaf-dashboard-navigation li a {
    padding: 10px 12px;
    font-size: 14px;
  }
  .yith-wcaf-dashboard .yith-wcaf-dashboard-summary .affiliate-stats .stat-box .stat-item {
    padding: 12px 16px;
  }
  .yith-wcaf-dashboard table { font-size: 13px; }
  .yith-wcaf-registration-form .become-an-affiliate-form,
  .yith-wcaf-registration-form .already-an-affiliate-wrapper,
  .yith-wcaf-registration-form .pending-request-wrapper,
  .yith-wcaf-registration-form .rejected-request-wrapper {
    padding: 34px 20px;
    border-radius: 16px;
  }
}
