/* Baza wspólna 1*/

.status-heading  {
  display: inline-block;
  /*padding: 6px 12px;
  border-radius: 4px;
  font-weight: bold;
  color: #fff;*/
  padding: 5px 12px 5px 12px;
  border-radius: 0% 30% 0% 30%;
  text-transform: uppercase;
  font-weight: 600;
  /*color: #fff;*/
}

/* Konkretne statusy */
.status-w-sprzedazy {
  background-color: var( --e-global-color-8a59da7 );
  fill: var( --e-global-color-8a59da7 );
}

.status-w-przygotowaniu {
  background-color: #dfa86b;
  fill: #dfa86b;
}

.status-realizacje,
.status-realizacja,
.status-zrealizowane {
  background-color: #ededed;
  fill: #ededed;
}

.status-aktualny  {
  background-color: var( --e-global-color-8a59da7 ); fill: var( --e-global-color-8a59da7 ); /* #a1ca73 zielony */
}
.status-rezerwacja {background-color: #ededed; fill: #ededed; /* szary */}

.status-sprzedany  {  background-color: #f7baba; fill: #f7baba;/* czerwony */}

.status-w-budowie {background-color: #dfa86b; fill: #dfa86b; /* pomarańczowy */}


button {cursor: pointer;}


/* 3WSD – Responsive Offers Table (Desktop) + Cards (Mobile) */
:root {
  --wsd-bg: #ffffff;
  --wsd-text: #1e1e1e;
  --wsd-text-light: #7A7A7A;
  --wsd-muted: #8e8983;
  --wsd-border: #e5e7eb;
  --wsd-accent: #8e8983;
  --wsd-accent-light: #E8DDCF;
  --wsd-accent-brown: #9E794B;
  --wsd-radius: 8px;
  --wsd-font-size: 1rem;
  --wsd-text-align: center;
}

.wsd-table-wrapper { font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; color: var(--wsd-text); }

/* Desktop table */
.wsd-table--desktop { overflow-x: auto; }
.wsd-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--wsd-bg);
  border: none;
  border-radius: var(--wsd-radius);
}
.wsd-table thead th {
  background: var( --e-global-color-ec454f5 );
  border-bottom: 3px solid #8e8983;
  color: var( --e-global-color-primary );
  font-weight: 600;
  text-align: var(--wsd-text-align);
  padding: 14px 16px;
  /*position: sticky; top: 0; z-index: 1;*/
  white-space: nowrap;
  border: none;
  font-size: var(--wsd-font-size);
  border-block-start: none !important;
}
.wsd-table tbody td { padding: 14px 16px; border-top: 1px solid var(--wsd-border); vertical-align: middle;border: none; font-size: var(--wsd-font-size);  text-align: var(--wsd-text-align);
}
/*.wsd-table tbody tr:hover { background: #fff7ed; }*/

.wsd-col.wsd-col--number {font-weight: 700;}
.wsd-price { font-weight: 700; white-space: nowrap; }
.wsd-dash { color: var(--wsd-muted); }

.wsd-table tr.is-available td:last-child .wsd-price { color: var(--wsd-accent-600); }
.wsd-table tr.is-reserved { opacity: 0.85; }
.wsd-table tr.is-sold { opacity: 0.65; }

.wsd-table--desktop tr[data-href] { cursor: default; }



/* Mobile cards */
.wsd-table--mobile { display: none; }
.wsd-card {
  border: 1px solid var(--wsd-border);
  border-radius: var(--wsd-radius);
  padding: 12px 14px;
  margin: 12px 0;
  background: #fff;
}
.wsd-card.is-sold { opacity: 0.75; }
.wsd-card__row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--wsd-border);
}
.wsd-card__row:last-child { border-bottom: 0; padding-bottom: 0; }
.wsd-card__label { color: var(--wsd-muted); font-size: 13px; font-weight: 600; }
.wsd-card__value { font-size: 15px; font-weight: 500; }
.wsd-card .wsd-price { font-size: 16px; color: var(--wsd-accent-600); }

.wsd-btn {
  display: inline-block; 
  background: transparent; 
  color:var( --e-global-color-primary ); 
  padding: 10px 15px;  
  border-radius: 25px;
  border-style: solid;
  border-width: 3px; 
  border-color: var(--wsd-accent-brown);
  text-decoration: none; 
  font-size: 0.8 rem; 
  line-height: 1;
  font-weight: 600;
  
}
.wsd-btn:hover { /*background: var(--wsd-accent-brown);opacity:0.8;*/}

/* Responsive switch */
@media (max-width: 767px) {
  .wsd-table--desktop { display: none; }
  .wsd-table--mobile { display: block; }
}

/* Cena za m² pod ceną główną */
:root { --wsd-price-m2: #6b7280; }

.wsd-price-group { display: flex; flex-direction: column; gap: 6px; }
.wsd-price-m2 { color: var(--wsd-price-m2); font-size: 13px; line-height: 1.2; }

/* Ghost button jak w zrzucie */
.wsd-btn--ghost {
  background: transparent;
  color: var( --e-global-color-primary );
  border: 1px solid var( --wsd-accent-brown );
  padding: 4px 8px;
  margin: auto;
  border-radius: 8px;
  font-size: 0.8rem;
}
.wsd-btn--ghost:hover, .wsd-btn--ghost:focus { background: transparent;   border: 1px solid var( --wsd-muted );color: var( --e-global-color-primary );}

/* Modal */
.wsd-modal { position: fixed; inset: 0; display: none;z-index:990; }
.wsd-modal[aria-hidden="false"] { display: block; }
.wsd-modal__backdrop {
  position: absolute; inset: 0; background: rgba(232, 221, 207, 0.85);
}
.wsd-modal__dialog {
  position: relative; z-index: 1; max-width: 920px; margin: 40vh auto; background: #fff;
  border-radius: 10px; padding: 24px 24px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.wsd-modal__close {
  position: absolute; right: 14px; top: 10px; background: transparent; border: 0;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.wsd-modal__title { font-size: 32px; margin: 10px 0 18px; }
.wsd-modal__content { overflow-x: auto; }

.wsd-price-history { width: 100%; border-collapse: collapse; }
.wsd-price-history thead th {
  text-align: left; padding: 12px 14px; background: var(--wsd-accent); color: #fff;
}
.wsd-price-history tbody td {
  padding: 12px 14px; border-bottom: 1px solid var(--wsd-border);
}

html.wsd-modal-open { overflow: hidden; }
