/* Page-specific styles for the customer portal and notifications - owner: Engy (Service 2). */

/* Customer tracking portal */
.portal {
  width: 100%;
  min-height: 100vh;
}

.portal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.portal-body {
  width: min(760px, 92%);
  margin: 40px auto;
}

.portal-body .hero {
  margin-bottom: 8px;
}

.portal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow-soft);
}

.portal-card h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.portal-card label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
}

.portal-card input,
.portal-card select,
.portal-card textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
  margin-bottom: 14px;
}

.portal-card textarea {
  resize: vertical;
}

.portal-card button {
  margin: 8px 8px 0 0;
}

#turnstile-widget {
  margin: 16px 0;
  overflow-x: auto;
}

.portal-timeline {
  margin-top: 20px;
}

.timeline-item {
  display: flex;
  gap: 14px;
  position: relative;
  min-height: 70px;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--line-strong);
}

.timeline-item.completed:not(:last-child)::after {
  background: var(--accent);
}

.timeline-marker {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.timeline-item.completed .timeline-marker {
  background: var(--accent);
  border-color: var(--accent);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-bottom: 22px;
}

.timeline-content small {
  color: var(--ink-2);
  font-size: 0.85rem;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.quote-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 700;
  padding-top: 16px;
}

.portal-warning {
  padding: 12px;
  background: var(--st-awaiting-bg);
  color: var(--st-awaiting);
  border-radius: 8px;
  margin: 16px 0;
}

.portal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.portal-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.portal-note {
  color: var(--ink-2);
  font-size: 0.9rem;
  margin-top: 24px;
}

.rating-card {
  text-align: left;
}

@media (max-width: 600px) {
  .portal-body {
    margin: 24px auto;
  }

  .portal-card {
    padding: 18px;
  }

  .portal-head {
    padding: 16px;
  }
}