/* assets/bridge.css */

/* Hide raw preview; show our results panel */
#capturedContainer { display: none !important; }

.gar-results { 
  max-width: 980px; margin: 24px auto; text-align: left;
  background: #fff; padding: 16px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.gar-hint { color:#666; }

.gar-spinner { display:flex; align-items:center; gap:10px; font-weight:600; }
.gar-loader {
  width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid #ddd; border-top-color: #007f8b; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.gar-error { color: #b00020; font-weight: 600; }

.gar-problems h3,
.gar-annotated h3,
.gar-recs h3 { margin: 12px 0; }

.gar-chips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom: 12px; }
.gar-chip  { background:#eef8f9; color:#045; padding:6px 10px; border-radius:999px; font-size:13px; }

.gar-gallery { display:grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 12px; }
.gar-card { background:#fafafa; border-radius:10px; padding:8px; border:1px solid #eee; }

/* Square thumbnails, no stretching */
.gar-card img {
  width: 100%;
  aspect-ratio: 1 / 1; /* makes the tile square */
  object-fit: cover;   /* crops inside the square instead of stretching */
  display: block;
  border-radius: 8px;
}

.gar-caption { font-size: 12px; color:#555; margin-top:6px; }

.gar-rec { display:flex; gap:14px; padding:12px 0; border-top:1px dashed #eee; }
.gar-rec:first-child { border-top:0; }
.gar-rec-left img { width:90px; height:90px; object-fit:cover; border-radius:10px; border:1px solid #eee; }
.gar-rec-title { font-weight:700; margin-bottom:4px; }
.gar-rec-reason { color:#444; margin-bottom:8px; font-size:14px; }
.gar-rec-actions .gar-btn {
  display:inline-block; background:#007f8b; color:#fff; padding:8px 12px; border-radius:8px; text-decoration:none;
}
.gar-rec-actions .gar-btn:hover { background:#006b74; }
.gar-routine h3 { margin: 16px 0 8px; }
.gar-routine-section { margin: 8px 0 12px; }
.gar-routine-section h4 { margin: 6px 0; font-weight: 700; }
.gar-routine-section ol { margin: 0 0 0 18px; }
/* Progress bar */
.gar-progress-wrap {
  width: 100%;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
  height: 20px;
  margin: 10px 0;
}

.gar-progress-bar {
  height: 100%;
  width: 0%;
  background: #007f8b;
  color: #fff;
  font-size: 12px;
  text-align: center;
  line-height: 20px;
  transition: width 0.3s ease;
}

.gar-questionnaire {
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
}

.gar-q-item {
  margin-bottom: 10px;
}

.gar-q-item label {
  display: block;
  font-size: 14px;
  color: #333;
}

.gar-q-item select,
.gar-q-item textarea {
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

#gar-start-analysis {
  margin-top: 8px;
  background: #007f8b;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

#gar-start-analysis:hover {
  opacity: 0.9;
}
/* blur results behind modal */
.gar-blur {
  filter: blur(10px);
  transform: translateZ(0);
  pointer-events: none;
  user-select: none;
}

/* overlay */
.gar-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}
.gar-auth-overlay.hidden { display: none; }

.gar-auth-modal {
  width: min(520px, 92vw);
  background: #f6f3ee;
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  position: relative;
}



.gar-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(0,0,0,.06);
  padding: 6px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.gar-auth-tab {
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
.gar-auth-tab.is-active {
  background: #fff;
}

.gar-auth-panel { display: none; }
.gar-auth-panel.is-active { display: block; }

.gar-auth-sub { margin: 6px 0 16px; color: rgba(0,0,0,.65); font-size: 14px; }

.gar-auth-label { display:block; font-size: 12px; margin: 10px 0 6px; opacity:.7; }

.gar-auth-modal input {
  width: 100%;
  border: 0;
  outline: none;
  padding: 14px 14px;
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
}

.gar-auth-submit {
  width: 100%;
  margin-top: 16px;
  border: 0;
  padding: 14px 16px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}