/* Appily thirtythree — Track & Support: Warehouse Loading Dock (unique to a33) */

.page-track-dock .page-main {
  padding-bottom: 0;
}

.a33-dock {
  --dock-ink: var(--a33-ink);
  --dock-muted: var(--a33-muted);
  background: #ece8e2;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Canopy header ── */
.a33-dock-canopy {
  position: relative;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  color: #fff;
  padding: 2rem 0 2.5rem;
  border-bottom: 6px solid var(--a33-carrot);
}

.a33-dock-canopy-lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 0.5rem 0;
  background: rgba(0, 0, 0, 0.35);
}

.a33-dock-canopy-lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffd54f;
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.8);
  animation: a33-dock-flicker 3s ease-in-out infinite;
}

.a33-dock-canopy-lights span:nth-child(2n) {
  animation-delay: 0.4s;
}

.a33-dock-canopy-lights span:nth-child(3n) {
  animation-delay: 0.9s;
  background: #81c784;
  box-shadow: 0 0 10px rgba(129, 199, 132, 0.7);
}

@keyframes a33-dock-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.a33-dock-canopy-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
  padding-top: 1.5rem;
}

.a33-dock-canopy-copy h1 {
  margin: 0.35rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.8vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
}

.a33-dock-canopy-copy h1 em {
  font-style: normal;
  color: var(--a33-lime);
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.a33-dock-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.a33-dock-lede {
  margin: 0;
  max-width: 48ch;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.a33-dock-status-lamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 100px;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  text-align: center;
}

.a33-dock-status-lamp strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
}

.a33-dock-status-lamp span:last-child {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.a33-dock-lamp-bulb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #666;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.a33-dock-status-lamp.is-found .a33-dock-lamp-bulb {
  background: #66bb6a;
  box-shadow: 0 0 16px rgba(102, 187, 106, 0.9);
}

.a33-dock-status-lamp.is-miss .a33-dock-lamp-bulb {
  background: #ef5350;
  box-shadow: 0 0 14px rgba(239, 83, 80, 0.8);
}

.a33-dock-status-lamp.is-idle .a33-dock-lamp-bulb {
  background: #ffd54f;
  box-shadow: 0 0 12px rgba(255, 213, 79, 0.6);
  animation: a33-dock-flicker 2s ease-in-out infinite;
}

/* ── Floor grid ── */
.a33-dock-floor {
  padding: 2rem 0 2.5rem;
}

.a33-dock-grid {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}

/* ── Clipboard form ── */
.a33-dock-clipboard {
  position: relative;
  background: #fffef5;
  border: 1px solid #d4cfc4;
  border-radius: 4px;
  box-shadow:
    0 2px 0 #c8c2b6,
    0 8px 24px rgba(46, 31, 39, 0.1);
  padding: 1.5rem 1.35rem 1.25rem;
}

.a33-dock-clip {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 48px;
  height: 28px;
  margin-left: -24px;
  background: linear-gradient(180deg, #888 0%, #555 100%);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.a33-dock-clip::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 32px;
  height: 8px;
  margin-left: -16px;
  background: #333;
  border-radius: 2px;
}

.a33-dock-clipboard-head {
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px dashed #ccc;
}

.a33-dock-clipboard-stamp {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--a33-carrot);
  border: 2px solid var(--a33-carrot);
  border-radius: 3px;
  transform: rotate(-2deg);
  margin-bottom: 0.5rem;
}

.a33-dock-clipboard-head h2 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--a33-teal-dark);
}

.a33-dock-clipboard-head p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--dock-muted);
}

.a33-dock-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.a33-dock-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.a33-dock-field span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dock-muted);
}

.a33-dock-field input {
  padding: 0.75rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
}

.a33-dock-field input:focus {
  outline: 2px solid var(--a33-teal);
  outline-offset: 1px;
  border-color: var(--a33-teal);
}

.a33-dock-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.a33-dock-clipboard-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 1.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0dcd4;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--dock-muted);
}

/* ── Bay wall monitor ── */
.a33-dock-wall {
  background: #3d3d3d;
  border-radius: 8px;
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow:
    inset 0 0 0 3px #2a2a2a,
    0 12px 36px rgba(0, 0, 0, 0.2);
}

.a33-dock-wall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.a33-dock-wall-pill {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.a33-dock-wall-pill.is-found {
  background: rgba(102, 187, 106, 0.35);
  color: #c8e6c9;
}

.a33-dock-wall-pill.is-miss {
  background: rgba(239, 83, 80, 0.35);
  color: #ffcdd2;
}

.a33-dock-wall-pill.is-idle {
  background: rgba(255, 213, 79, 0.25);
  color: #fff9c4;
}

/* Truck rail */
.a33-dock-rail {
  position: relative;
  height: 36px;
  margin-bottom: 0.75rem;
}

.a33-dock-rail-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  background: repeating-linear-gradient(90deg, #555 0, #555 12px, #777 12px, #777 24px);
  border-radius: 2px;
}

.a33-dock-truck {
  position: absolute;
  top: 50%;
  left: calc(var(--truck-at, 0) * 25% + 4%);
  transform: translate(-50%, -55%);
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: left 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
  z-index: 2;
}

/* Loading bays */
.a33-dock-bays {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.a33-dock-bay {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.a33-dock-bay-door {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #1a1a1a;
  border: 2px solid #555;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.a33-dock-bay-num {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--a33-lime);
  background: rgba(0, 0, 0, 0.6);
  padding: 0.15rem 0.35rem;
  border-radius: 2px;
}

.a33-dock-bay-shutter {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    #4a4a4a 0,
    #4a4a4a 8px,
    #3a3a3a 8px,
    #3a3a3a 16px
  );
  transform: translateY(0);
  transition: transform 0.55s cubic-bezier(0.34, 1.1, 0.64, 1);
  z-index: 2;
}

.a33-dock-bay.is-open .a33-dock-bay-shutter {
  transform: translateY(-88%);
}

.a33-dock-bay.is-open .a33-dock-bay-door {
  background: linear-gradient(180deg, #2d4a32 0%, #1a3020 100%);
  box-shadow: inset 0 0 24px rgba(125, 157, 122, 0.35);
}

.a33-dock-bay.is-active .a33-dock-bay-door {
  border-color: var(--a33-lime);
  box-shadow: 0 0 16px rgba(232, 244, 140, 0.35);
}

.a33-dock-bay.is-dark .a33-dock-bay-shutter {
  opacity: 0.5;
}

.a33-dock-bay-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

.a33-dock-bay-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.a33-dock-bay-info strong {
  font-size: 0.72rem;
  line-height: 1.25;
}

.a33-dock-bay-info em {
  font-size: 0.62rem;
  font-style: normal;
  opacity: 0.65;
  line-height: 1.3;
}

.a33-dock-bay.is-open .a33-dock-bay-info strong {
  color: var(--a33-lime);
}

/* Result panel */
.a33-dock-panel {
  min-height: 120px;
}

.a33-dock-manifest {
  background: #fffef5;
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  border-left: 4px solid var(--a33-teal);
}

.a33-dock-manifest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.a33-dock-manifest-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dock-muted);
}

.a33-dock-manifest-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(26, 83, 92, 0.12);
  color: var(--a33-teal-dark);
}

.a33-dock-manifest-id {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dock-ink);
  word-break: break-all;
}

.a33-dock-manifest-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.82rem;
}

.a33-dock-manifest-meta dt {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dock-muted);
  margin-bottom: 0.15rem;
}

.a33-dock-manifest-meta dd {
  margin: 0;
  font-weight: 700;
  color: var(--dock-ink);
}

.a33-dock-manifest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.a33-dock-alert,
.a33-dock-idle {
  padding: 1.25rem;
  border-radius: 6px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
}

.a33-dock-alert-icon,
.a33-dock-idle-icon {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.a33-dock-alert strong,
.a33-dock-idle strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.a33-dock-alert p,
.a33-dock-idle p {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  opacity: 0.85;
  line-height: 1.5;
}

/* ── Pallet quick links ── */
.a33-dock-pallets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding-bottom: 2.5rem;
}

.a33-dock-pallet {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 2px solid var(--a33-border);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--dock-ink);
  text-decoration: none;
  box-shadow: 0 3px 0 #d4cfc4;
  transition: transform 0.12s, box-shadow 0.12s;
}

.a33-dock-pallet span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--a33-teal);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
}

.a33-dock-pallet:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #d4cfc4;
  color: var(--a33-teal);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .a33-dock-canopy-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .a33-dock-status-lamp {
    flex-direction: row;
    justify-content: flex-start;
    width: fit-content;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .a33-dock-grid {
    grid-template-columns: 1fr;
  }

  .a33-dock-bays {
    grid-template-columns: repeat(2, 1fr);
  }

  .a33-dock-pallets {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .a33-dock-bays {
    grid-template-columns: 1fr 1fr;
  }

  .a33-dock-manifest-meta {
    grid-template-columns: 1fr;
  }

  .a33-dock-pallets {
    grid-template-columns: 1fr;
  }
}
