/* Merchant portal layout (partners.html) */

.merch-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.merch-layout {
  display: grid;
  grid-template-columns: min(220px, 32vw) minmax(0, 1fr);
  gap: 28px 32px;
  align-items: start;
}

.merch-sidebar {
  position: relative;
}

.merch-main {
  min-width: 0;
}

#partner-form.prem-form-grid {
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.merch-toc {
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.merch-toc--sidebar {
  position: sticky;
  top: 76px;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 14px 12px 16px;
  border-radius: 18px;
  border: 1px solid rgba(30, 58, 95, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 255, 0.96) 55%, rgba(255, 251, 242, 0.88) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 18px 40px rgba(26, 35, 50, 0.08),
    0 4px 12px rgba(0, 51, 153, 0.06);
  backdrop-filter: blur(10px);
}

.merch-toc a {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1e3a5f;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.55);
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.merch-toc--sidebar a {
  width: 100%;
  box-sizing: border-box;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.86rem;
  font-weight: 650;
}

.merch-toc a:hover {
  border-color: rgba(0, 51, 153, 0.22);
  color: #003399;
  box-shadow: 0 6px 16px rgba(0, 51, 153, 0.1);
  transform: translateY(-1px);
}

body.ue-partners .merch-fieldset .prem-check,
body.ue-partners .merch-fieldset label.prem-check {
  color: #3d4a5c !important;
}

body.ue-partners .topbar.topbar--eats.merchant-shell-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(248, 250, 255, 0.78) 100%) !important;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 36px rgba(12, 32, 62, 0.1) !important;
  backdrop-filter: blur(14px) !important;
}

body.ue-partners .footer--eats.merchant-shell-footer {
  margin-top: 56px !important;
  padding: 36px 0 44px !important;
  background: linear-gradient(185deg, rgba(30, 58, 95, 0.04) 0%, rgba(14, 28, 48, 0.92) 52%, rgba(8, 16, 32, 0.98) 100%) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.12) !important;
}

body.ue-partners .merchant-shell-footer .footer-brand {
  color: #fff !important;
}

body.ue-partners .merchant-shell-footer p {
  color: rgba(255, 255, 255, 0.7) !important;
}

.merch-fieldset {
  border: 1px solid rgba(30, 58, 95, 0.14);
  border-radius: 16px;
  padding: 22px 20px 8px;
  margin-bottom: 22px;
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
  box-shadow: 0 8px 28px rgba(26, 35, 50, 0.06);
}

.merch-fieldset > legend {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0 10px;
  color: #1e3a5f;
}

.merch-help {
  font-size: 0.86rem;
  color: #3d4a5c;
  line-height: 1.55;
  margin: 0 0 16px;
  max-width: 72ch;
}

.merch-upload {
  border: 2px dashed rgba(0, 51, 153, 0.28);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  background: rgba(0, 51, 153, 0.03);
}

.merch-upload label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.merch-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.merch-actions-row a.prem-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.merch-grid-2 {
  display: grid;
  gap: 14px;
}

@media (min-width: 640px) {
  .merch-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.merch-table-wrap {
  overflow-x: auto;
  margin: 12px 0 18px;
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 12px;
}

.merch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.merch-table th,
.merch-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}

.merch-table th {
  background: rgba(0, 51, 153, 0.06);
  font-weight: 700;
  color: #1e3a5f;
  white-space: nowrap;
}

.merch-table input {
  width: 100%;
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(30, 58, 95, 0.18);
  font: inherit;
}

.merch-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.2);
  color: #5c4a12;
  margin-bottom: 10px;
}

body.ue-partners .merchant-shell-footer .footer-inner {
  position: relative;
}

body.ue-partners .merchant-shell-footer .footer-inner::before {
  content: "";
  position: absolute;
  left: 0;
  top: -18px;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f5c542, #003399, #2dd4bf);
  box-shadow: 0 0 18px rgba(245, 197, 66, 0.55);
}

body.ue-partners .topbar-actions--merch,
body.ue-partners .topbar-actions--customer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

@media (max-width: 900px) {
  .merch-layout {
    grid-template-columns: 1fr;
  }

  .merch-sidebar {
    order: -1;
  }

  .merch-toc--sidebar {
    position: relative;
    top: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .merch-toc--sidebar a {
    width: auto;
    flex: 1 1 calc(50% - 6px);
    min-width: 120px;
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
}
