/* ======================================
   SALE PEN MARKETPLACE MANAGER
====================================== */

/* MAIN WIDGET STYLE */

.sale-market-listing-widget,
.sale-market-cattle-widget {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.95),
    rgba(2, 6, 23, 0.95)
  );

  border: 1px solid rgba(148, 163, 184, 0.15);

  border-radius: 16px;

  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);

  overflow: hidden;
}

/* HEADER */

.sale-market-listing-widget .widget-header,
.sale-market-cattle-widget .widget-header {
  padding: 20px;

  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.sale-market-listing-widget h3,
.sale-market-cattle-widget h3 {
  color: white;

  font-size: 22px;

  margin-bottom: 8px;
}

.sale-market-listing-widget p,
.sale-market-cattle-widget p {
  color: #cbd5e1;
}

/* BODY */

.sale-market-listing-widget .widget-body,
.sale-market-cattle-widget .widget-body {
  padding: 20px;
}

/* ======================================
   MARKET LISTED CARD
====================================== */

.market-listed-card {
  padding: 25px;

  background: linear-gradient(145deg, #052e16, #020617);

  border-radius: 14px;

  border: 1px solid rgba(34, 197, 94, 0.35);
}

.market-listed-card h4 {
  color: #86efac;

  font-size: 22px;

  margin-bottom: 15px;
}

.market-listed-card strong {
  color: white;

  font-size: 28px;
}

/* ======================================
   NOT LISTED CARD
====================================== */

.market-not-listed-card {
  padding: 25px;

  background: linear-gradient(145deg, #3f1d1d, #020617);

  border-radius: 14px;

  border: 1px solid rgba(239, 68, 68, 0.35);
}

.market-not-listed-card h4 {
  color: #fca5a5;

  font-size: 22px;

  margin-bottom: 15px;
}

.market-not-listed-card p {
  color: #cbd5e1;

  margin-bottom: 20px;
}

/* ======================================
   BUTTONS
====================================== */

.sale-market-listing-widget .widget-button {
  display: block;

  width: 100%;

  padding: 13px;

  margin-top: 10px;

  border-radius: 10px;

  border: none;

  background: #2563eb;

  color: white;

  font-weight: bold;

  text-align: center;

  text-decoration: none;

  cursor: pointer;

  transition: 0.2s ease;
}

.sale-market-listing-widget .widget-button:hover {
  background: #1d4ed8;

  transform: translateY(-2px);
}

/* ======================================
   CATTLE GRID
====================================== */

.market-cattle-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 20px;
}

.market-cattle-card {
  background: linear-gradient(145deg, #111827, #020617);

  border-radius: 14px;

  padding: 20px;

  border: 1px solid rgba(56, 189, 248, 0.15);

  transition: 0.25s ease;
}

.market-cattle-card:hover {
  transform: translateY(-4px);

  border-color: #38bdf8;

  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.25);
}

.market-cattle-card h4 {
  color: white;

  font-size: 20px;

  margin-bottom: 15px;
}

.market-cattle-info p {
  color: #cbd5e1;

  margin: 8px 0;
}

.market-cattle-price {
  margin-top: 15px;

  padding-top: 15px;

  border-top: 1px solid rgba(255, 255, 255, 0.1);

  color: #22c55e;

  font-size: 22px;

  font-weight: bold;
}

/* EMPTY STATE */

.sale-market-listing-widget .empty-state,
.sale-market-cattle-widget .empty-state {
  padding: 35px;

  text-align: center;

  color: #94a3b8;

  background: #020617;

  border-radius: 12px;
}
/* ======================================
   SALE PEN OVERVIEW WIDGET
====================================== */

.sale-market-overview-widget {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.95),
    rgba(2, 6, 23, 0.95)
  );

  border: 1px solid rgba(148, 163, 184, 0.15);

  border-radius: 16px;

  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);

  overflow: hidden;
}

/* HEADER */

.sale-market-overview-widget .widget-header {
  padding: 20px;

  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.sale-market-overview-widget h3 {
  color: white;

  font-size: 22px;

  margin: 0;
}

/* BODY */

.sale-market-overview-widget .widget-body {
  padding: 20px;
}

/* GRID */

.market-overview-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 15px;
}

/* CARDS */

.market-overview-card {
  background: linear-gradient(145deg, #111827, #020617);

  border-radius: 14px;

  padding: 18px;

  border: 1px solid rgba(148, 163, 184, 0.15);

  transition: 0.2s ease;
}

.market-overview-card:hover {
  transform: translateY(-3px);

  border-color: #38bdf8;
}

/* LABEL */

.market-overview-card span {
  display: block;

  color: #94a3b8;

  font-size: 14px;

  margin-bottom: 10px;
}

/* VALUE */

.market-overview-card strong {
  display: block;

  color: white;

  font-size: 22px;
}

/* MARKETPLACE STATUS COLORS */

.market-overview-card strong:has(+ *) {
  color: white;
}
/* ======================================
   SALE PEN HEADER WIDGET
====================================== */

.sale-market-header-widget {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.95),
    rgba(2, 6, 23, 0.95)
  );

  border: 1px solid rgba(148, 163, 184, 0.15);

  border-radius: 16px;

  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);

  overflow: hidden;
}

/* HEADER AREA */

.sale-market-header-widget .widget-header {
  padding: 25px;

  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.sale-market-header-widget h2,
.sale-market-header-widget h3 {
  color: white;

  font-size: 28px;

  margin: 0 0 8px 0;
}

.sale-market-header-widget p {
  color: #cbd5e1;

  font-size: 15px;

  margin: 0;
}

/* BODY */

.sale-market-header-widget .widget-body {
  padding: 20px;
}

/* INFO GRID */

.sale-pen-info-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 15px;
}

/* INFO CARDS */

.sale-pen-info-card {
  background: linear-gradient(145deg, #111827, #020617);

  border-radius: 14px;

  padding: 18px;

  border: 1px solid rgba(148, 163, 184, 0.15);
}

.sale-pen-info-card span {
  display: block;

  color: #94a3b8;

  font-size: 14px;

  margin-bottom: 8px;
}

.sale-pen-info-card strong {
  color: white;

  font-size: 20px;
}

/* HOVER */

.sale-pen-info-card:hover {
  border-color: #38bdf8;

  transform: translateY(-3px);

  transition: 0.2s ease;
}
/* ======================================
   MARKETPLACE FEE INFORMATION BOX
====================================== */

.marketplace-fee-alert {
  margin-top: 20px;

  padding: 20px;

  border-radius: 16px;

  background: linear-gradient(
    145deg,
    rgba(30, 58, 138, 0.35),
    rgba(2, 6, 23, 0.95)
  );

  border: 2px solid rgba(56, 189, 248, 0.45);

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.marketplace-fee-alert h4 {
  color: white;

  font-size: 20px;

  margin-bottom: 12px;
}

.marketplace-fee-alert p {
  color: #cbd5e1;

  line-height: 1.6;

  margin: 8px 0;
}

.marketplace-fee-alert strong {
  color: #22c55e;

  font-size: 20px;
}
/* MOBILE */

@media (max-width: 700px) {
  .sale-pen-info-grid {
    grid-template-columns: 1fr;
  }
}
/* Responsive */

@media (max-width: 1100px) {
  .market-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .market-overview-grid {
    grid-template-columns: 1fr;
  }
}
/* ======================================
   RESPONSIVE
====================================== */

@media (max-width: 1100px) {
  .market-cattle-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .market-cattle-grid {
    grid-template-columns: 1fr;
  }
}
/* ======================================
SALE PEN MARKETPLACE ACTIONS
====================================== */

.widget:has(h3:contains("Marketplace Actions")) {
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.95),
    rgba(2, 6, 23, 0.95)
  );

  border: 1px solid rgba(148, 163, 184, 0.15);

  border-radius: 16px;

  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);

  overflow: hidden;
}

/* HEADER */

.widget-header {
  padding: 20px;

  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.widget-header h3 {
  color: white;

  font-size: 22px;

  margin-bottom: 8px;
}

.widget-header p {
  color: #cbd5e1;
}

/* BODY */

.widget-body {
  padding: 20px;
}

/* PRICE INPUT */

input[name="sale_price"] {
  width: 100%;

  padding: 14px;

  background: #020617;

  color: white;

  border-radius: 10px;

  border: 1px solid rgba(148, 163, 184, 0.25);

  font-size: 18px;

  margin-top: 8px;
}

input[name="sale_price"]:focus {
  outline: none;

  border-color: #2563eb;

  box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

/* BUTTON */

button[name="list_sale_pen"] {
  width: 100%;

  margin-top: 15px;

  padding: 14px;

  border-radius: 10px;

  background: #2563eb;

  color: white;

  font-weight: bold;

  font-size: 16px;

  border: none;

  cursor: pointer;

  transition: 0.2s;
}

button[name="list_sale_pen"]:hover {
  background: #1d4ed8;

  transform: translateY(-2px);
}

/* ERROR */

.widget-error {
  padding: 20px;

  border-radius: 12px;

  background: linear-gradient(145deg, #3f1d1d, #020617);

  border: 1px solid rgba(239, 68, 68, 0.35);

  color: #fca5a5;

  text-align: center;

  font-weight: bold;
}
body {
  border: 10px solid red !important;
}
