/* Business Portal Styles */

.portal-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ── Auth screen ────────────────────────────────── */
.auth-screen {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
}

.auth-logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.auth-logo span {
  background: linear-gradient(135deg, var(--primary), #00C7BE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: white;
  color: #333;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 12px;
}
.btn-google:hover { opacity: 0.9; }

.btn-google svg {
  flex-shrink: 0;
}

/* Form inputs */
.field {
  margin-bottom: 16px;
  text-align: left;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--primary);
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.field select option {
  background: var(--bg-secondary);
}

/* Primary button */
.btn-primary {
  width: 100%;
  height: var(--btn-height);
  background: linear-gradient(135deg, var(--primary), #00C7BE);
  color: white;
  border: none;
  border-radius: var(--btn-radius);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  cursor: pointer;
  transition: opacity 0.2s;
}
a.btn-primary { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Secondary / outline button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(109, 47, 154, 0.1);
}

/* Auth error */
.auth-error {
  color: var(--error);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
}

/* ── Top nav bar ────────────────────────────────── */
.portal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.portal-nav-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.portal-nav-brand span {
  background: linear-gradient(135deg, var(--primary), #00C7BE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.portal-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-badge {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-signout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-signout:hover { border-color: var(--error); color: var(--error); }

.settings-menu { position: relative; }

.btn-icon-settings {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.btn-icon-settings:hover { border-color: var(--primary); }

.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px;
  z-index: 20;
}

.settings-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.settings-dropdown-item:hover { background: var(--bg-primary); color: var(--error); }
.settings-dropdown-danger { color: var(--error); }

/* ── Section headings ───────────────────────────── */
.section-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.section-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ── Claimed places list ────────────────────────── */
.places-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.place-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.place-card-info h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.place-card-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.place-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }

/* Status badge */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
}
.badge-pending  { background: rgba(255, 149, 0, 0.15);  color: var(--warning); }
.badge-approved { background: rgba(52, 199, 89, 0.15);  color: var(--success); }
.badge-rejected { background: rgba(255, 59, 48, 0.15);  color: var(--error);   }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; line-height: 1.6; }

/* ── Search for place to claim ──────────────────── */
.search-box {
  position: relative;
  margin-bottom: 16px;
}

.search-box input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  padding: 14px 44px 14px 16px;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--primary); }

.search-box-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
  line-height: 1;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* The claim search renders our results and Google's into two stacked lists —
   give the seam between them the same spacing as within a list. */
.search-results:not(:empty) + .search-results:not(:empty) { margin-top: 8px; }

.search-result-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.search-result-item:hover { border-color: var(--primary); }

.search-result-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}
.search-result-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

.search-result-claimed {
  font-size: 11px;
  color: var(--warning);
  font-weight: 600;
}

/* ── Edit profile form ──────────────────────────── */
.edit-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  margin-top: 24px;
}

.edit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.edit-panel-header h2 {
  font-size: 18px;
  font-weight: 800;
}

/* Toast / feedback messages */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success { border-color: var(--success); color: var(--success); }
.toast.error   { border-color: var(--error);   color: var(--error);   }

/* ── Loading overlay ────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-radius: 9px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
}

/* Photo upload */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.photo-thumb {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.7);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-add-btn {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px dashed var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.photo-add-btn:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 480px) {
  .hours-row { grid-template-columns: 80px 1fr 1fr; }
  .hours-row .closed-toggle { grid-column: span 3; }
  .auth-card { padding: 28px 20px; }
  .place-card { flex-direction: column; align-items: flex-start; }
}

/* ── Confirm modal ───────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 400px;
  margin: 20px;
}

.modal h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.modal p  { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.btn-cancel {
  flex: 1;
  height: 44px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-confirm-reject {
  flex: 1;
  height: 44px;
  background: var(--error);
  border: none;
  color: white;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-confirm-reject:disabled { opacity: 0.5; cursor: default; }

/* Single-page portal: Your Places, then the claim search (open with no
   places, otherwise behind the "Claim another place" button). */
.claim-open-btn { width: 100%; margin-top: 16px; }
.claim-section { margin-top: 32px; }
.claim-section.claim-section-first { margin-top: 0; }
.claim-section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.btn-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.btn-link:hover { color: var(--text-primary); }
