/* Portal Parteneri — small additions on top of the main site stylesheet. */

.portal-partner-since {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--gold-300);
  font-weight: 600;
}

.portal-password-requirements {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.portal-password-requirements li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--ivory-dim);
  transition: color 0.15s ease;
}
.portal-password-requirements li::before {
  content: '○';
  flex-shrink: 0;
  font-size: 0.68rem;
  color: var(--ivory-dim);
}
.portal-password-requirements li.met {
  color: #6fcf97;
}
.portal-password-requirements li.met::before {
  content: '✓';
  color: #6fcf97;
}

.portal-toast {
  position: fixed;
  top: 6.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: linear-gradient(160deg, rgba(28,28,34,0.97), rgba(10,10,13,0.98));
  border: 1px solid rgba(111,207,151,0.4);
  border-radius: 6px;
  padding: 0.8rem 1.4rem;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
  opacity: 0;
  z-index: 500;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
  text-align: center;
}
.portal-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.portal-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 9rem 1.6rem 5rem;
}
.portal-main.portal-main-wide {
  max-width: 1120px;
}

.portal-card {
  background: linear-gradient(160deg, rgba(28,28,34,0.75), rgba(10,10,13,0.85));
  border: 1px solid rgba(217,154,46,0.16);
  border-radius: 10px;
  padding: 2.2rem;
  margin-bottom: 2rem;
}

.portal-card h1,
.portal-card h2 {
  font-family: var(--font-display);
  color: var(--ivory);
  margin: 0 0 1.4rem;
}
.portal-card h1 { font-size: 1.9rem; }
.portal-card h2 { font-size: 1.4rem; }

.portal-order-section-title {
  font-family: var(--font-display);
  color: var(--ivory);
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.portal-order-wizard {
  max-width: 560px;
}

.portal-order-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
}
@media (max-width: 520px) {
  /* Side by side, both buttons' natural width overflows a phone screen —
     stack them full-width instead. */
  .portal-order-step-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-order-step-actions .btn {
    width: 100%;
    text-align: center;
  }
}

.portal-address-subtitle {
  font-family: var(--font-body);
  color: var(--gold-300);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 1.4rem 0 0.9rem;
}
.portal-address-subtitle:first-of-type {
  margin-top: 0;
}

.portal-order-number {
  color: var(--gold-300);
  font-weight: 700;
  white-space: nowrap;
}

.portal-required-mark {
  color: #e07a5f;
}
.portal-required-note {
  color: var(--ivory-dim);
  font-size: 0.78rem;
  margin: -0.4rem 0 0.2rem;
}

.portal-form-stack {
  display: grid;
  gap: 1.3rem;
}

.portal-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 520px) {
  .portal-form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.portal-cui-status {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.4rem;
  min-height: 1.1em;
}
.portal-cui-status.loading { color: var(--ivory-dim); }
.portal-cui-status.ok { color: #6fcf97; }
.portal-cui-status.err { color: #e07a5f; }

.portal-cui-denumire {
  color: var(--ivory-dim) !important;
  background: rgba(255,255,255,0.02) !important;
  cursor: default;
}

.portal-combobox {
  position: relative;
}
.portal-combobox-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(28,28,34,0.97), rgba(10,10,13,0.98));
  border: 1px solid rgba(217,154,46,0.3);
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.4);
  padding: 0.4rem;
  z-index: 200;
}
.portal-combobox-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-radius: 4px;
  background: none;
  border: none;
  color: var(--ivory-dim);
  font-family: var(--font-body);
  font-size: 0.88rem;
  cursor: pointer;
}
.portal-combobox-option:hover,
.portal-combobox-option.active {
  background: rgba(217,154,46,0.1);
  color: var(--ivory);
}
.portal-combobox-empty {
  padding: 0.5rem 0.7rem;
  color: var(--ivory-dim);
  font-size: 0.82rem;
}

.form-row.portal-checkbox-row {
  margin-top: -0.3rem;
}
.form-row.portal-checkbox-row label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.85rem;
  color: var(--ivory-dim);
  cursor: pointer;
}
.portal-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-300);
  cursor: pointer;
}

.portal-quantity-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(217,154,46,0.1);
}
.portal-quantity-row:last-of-type { border-bottom: none; }
.portal-quantity-row label {
  color: var(--ivory);
  font-size: 0.95rem;
}
.portal-quantity-row input[type="number"] {
  width: 100%;
  padding: 0.6rem 0.7rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(217,154,46,0.25);
  border-radius: 4px;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.portal-table th,
.portal-table td {
  text-align: left;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid rgba(217,154,46,0.12);
  color: var(--ivory-dim);
}
.portal-table th {
  color: var(--gold-300);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.portal-table td { color: var(--ivory); }

.portal-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(217,154,46,0.12);
  color: var(--gold-300);
  border: 1px solid rgba(217,154,46,0.3);
}
.portal-badge-inactive {
  background: rgba(224,122,95,0.12);
  color: #e07a5f;
  border-color: rgba(224,122,95,0.35);
}
.portal-badge-done {
  background: rgba(111,207,151,0.12);
  color: #6fcf97;
  border-color: rgba(111,207,151,0.35);
}

.portal-inline-form {
  display: inline-block;
}

.portal-status-select {
  background: rgba(8,8,10,0.6);
  border: 1px solid rgba(234,182,70,0.3);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
}
.portal-status-select:focus {
  outline: none;
  border-color: var(--gold-500);
}

.portal-order-expand-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(217,154,46,0.3);
  background: none;
  color: var(--gold-300);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.portal-order-expand-btn:hover {
  border-color: var(--gold-300);
  color: var(--gold-100);
}
.portal-order-expand-btn.open {
  transform: rotate(180deg);
}

.portal-order-detail td {
  padding: 0 0.6rem 1.2rem;
  background: rgba(217,154,46,0.03);
  border-bottom: 1px solid rgba(217,154,46,0.12);
}

.portal-order-delivery-info {
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(217,154,46,0.15);
}
.portal-order-delivery-info p {
  color: var(--ivory-dim);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 0.6rem;
}

/* Saved-address book (includes/partner-addresses.php) — a partner's list
   of delivery addresses, shared between account.php (pure management) and
   order.php (management + picking one for the current order). */
.portal-address-book {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.portal-address-add-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: none;
  border: 1px dashed rgba(217,154,46,0.4);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  color: var(--gold-300);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.portal-address-add-btn:hover {
  border-color: var(--gold-300);
  background: rgba(217,154,46,0.06);
}
.portal-address-add-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(217,154,46,0.12);
  color: var(--gold-300);
  font-size: 1rem;
  flex-shrink: 0;
}
.portal-address-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(217,154,46,0.14);
  border-radius: 6px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.portal-address-row[data-selectable] {
  cursor: pointer;
}
.portal-address-row[data-selectable]:hover {
  border-color: rgba(217,154,46,0.35);
}
.portal-address-row.selected {
  border-color: var(--gold-300);
  background: rgba(217,154,46,0.06);
}
.portal-address-row-main {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  flex: 1;
  min-width: 0;
}
.portal-address-row-radio {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  border-radius: 50%;
  border: 1px solid rgba(217,154,46,0.5);
  position: relative;
}
.portal-address-row.selected .portal-address-row-radio {
  border-color: var(--gold-300);
}
.portal-address-row.selected .portal-address-row-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold-300);
}
.portal-address-row-text {
  color: var(--ivory-dim);
  font-size: 0.85rem;
  line-height: 1.6;
}
.portal-address-row-text strong {
  color: var(--ivory);
}

.portal-order-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.portal-order-items-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  color: var(--gold-300);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid rgba(217,154,46,0.15);
}
.portal-order-items-table td {
  padding: 0.5rem 0.6rem;
  color: var(--ivory-dim);
  border-bottom: 1px solid rgba(217,154,46,0.08);
}
.portal-order-items-table tr:last-child td {
  border-bottom: none;
}

.portal-order-item-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.portal-order-item-thumb {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
}
.portal-link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-300);
  text-decoration: none;
}
.portal-link-btn:hover {
  color: var(--gold-100);
}
.portal-link-danger {
  color: #e07a5f;
}
.portal-link-danger:hover {
  color: #f09a80;
}

/* admin/index.php: per-row "Acțiuni" dropdown — a compact kebab (⋮) icon
   button instead of a labeled one, since it repeats on every row. Reuses
   .portal-account-switcher/-menu (nav account dropdown) for the menu
   itself; its items reuse .lang-option, which is styled for an <a> —
   reset the native <button> chrome here so the delete button (inside its
   own <form>, for the CSRF token) looks the same as the button next to it. */
.portal-row-actions-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: none;
  color: var(--ivory-dim);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.portal-row-actions-toggle:hover,
.portal-row-actions.open .portal-row-actions-toggle {
  border-color: rgba(217,154,46,0.4);
  color: var(--gold-300);
  background: rgba(217,154,46,0.08);
}
.portal-row-actions-menu {
  width: max-content;
  /* The inherited .portal-account-menu only hides via opacity (for a fade
     transition), which still occupies layout space even while invisible —
     harmless in the navbar, but here it sits inside the table's
     overflow-x:auto wrapper, which computes overflow-y to auto too. That
     invisible box (positioned below the toggle) was enough to make the
     wrapper think it had vertical overflow and show a scrollbar even with
     a single, short row. display:none removes it from layout entirely
     when closed. */
  display: none;
}
.portal-row-actions.open .portal-row-actions-menu {
  display: block;
}
.portal-row-actions-menu button.lang-option {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

/* The details modal's content varies (account info + up to two address
   profiles) rather than the long scrollable content the base .modal-box
   height (75vh) was sized for — auto-size it instead, capped so it still
   scrolls internally on a short viewport rather than overflowing it. */
.portal-details-modal .modal-box {
  height: auto;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.portal-note {
  color: var(--ivory-dim);
  font-size: 0.85rem;
  line-height: 1.6;
}

.portal-credentials-box {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(217,154,46,0.07);
  border: 1px solid rgba(217,154,46,0.25);
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--ivory);
}
.portal-credentials-box strong { color: var(--gold-300); }
