/* Business Profile page - full-page setup for company info, footer, logo, intro text, intro image */
/* Scoped to #business-profile-root. Natural page scroll like Library Manager – no locked viewport/footer. */

#page-content:has(.business-profile-page) {
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0 !important;
  padding-bottom: 40px !important;
  margin-bottom: 0 !important;
  height: auto !important;
  min-height: calc(100vh - 60px);
}

#business-profile-root.business-profile-page {
  margin-left: var(--sidebar-width, 260px);
  width: calc(100% - var(--sidebar-width, 260px));
  min-height: calc(100vh - 60px);
  padding: 84px 20px 40px 20px;
  max-width: none;
  margin-right: 0;
  margin-bottom: 0;
  box-sizing: border-box;
  background: var(--content-area-bg, #f8fafc);
  overflow: visible;
  display: flex;
  flex-direction: column;
}

#business-profile-root .bp-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

#business-profile-root .bp-header-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

#business-profile-root .bp-logo-preview {
  width: 80px;
  height: 80px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#business-profile-root .bp-logo-preview .bp-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#business-profile-root .bp-logo-preview .bp-logo-placeholder {
  font-size: 0.75rem;
  color: #9ca3af;
}

#business-profile-root .bp-header-right {
  flex: 1;
  min-width: 0;
}

#business-profile-root .bp-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.15rem 0;
  line-height: 1.3;
}

#business-profile-root .bp-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.3;
}

#business-profile-root .bp-layout {
  display: flex;
  gap: 1rem;
  flex: 1;
  min-height: 300px;
  overflow: visible;
}

#business-profile-root .bp-sidebar {
  width: 200px;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.6rem;
  background: #f9fafb;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

#business-profile-root .bp-nav-item {
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  text-decoration: none;
  display: block;
}

#business-profile-root .bp-nav-item:hover {
  background: #e5e7eb;
  color: #111827;
}

#business-profile-root .bp-nav-item.bp-active {
  background: #ddd6fe;
  color: #4338ca;
}

#business-profile-root .bp-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: visible;
}

#business-profile-root .bp-section {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  background: #fff;
  flex-shrink: 0;
}

#business-profile-root .bp-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

#business-profile-root .bp-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

#business-profile-root .bp-form-row:last-child {
  margin-bottom: 0;
}

#business-profile-root .bp-form-row label {
  display: block;
  font-size: 0.825rem;
  color: #6b7280;
  margin-bottom: 0.15rem;
}

#business-profile-root .bp-form-field {
  flex: 1;
  min-width: 120px;
}

#business-profile-root .bp-form-field input,
#business-profile-root .bp-form-field textarea {
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
  line-height: 1.35;
}

#business-profile-root .bp-form-field textarea {
  min-height: 60px;
  resize: vertical;
  max-height: 120px;
}

#business-profile-root .bp-form-field-full {
  flex: 1 1 100%;
}

#business-profile-root .bp-char-counter {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}

#business-profile-root .bp-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  color: #374151;
}

#business-profile-root .bp-btn:hover {
  background: #f3f4f6;
}

#business-profile-root .bp-btn-primary {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

#business-profile-root .bp-btn-primary:hover:not(:disabled) {
  background: #4338ca;
  border-color: #4338ca;
}

#business-profile-root .bp-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#business-profile-root .bp-btn-outline {
  background: transparent;
  border-color: #4f46e5;
  color: #4f46e5;
}

#business-profile-root .bp-btn-outline:hover {
  background: #eef2ff;
}

#business-profile-root .bp-sticky-save {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

#business-profile-root .bp-notification-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#business-profile-root .bp-notification {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  max-width: 320px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#business-profile-root .bp-notification-success {
  background: #d1fae5;
  color: #065f46;
}

#business-profile-root .bp-notification-error {
  background: #fee2e2;
  color: #991b1b;
}

#business-profile-root .bp-notification-info {
  background: #dbeafe;
  color: #1e40af;
}

#business-profile-root .bp-signed-out {
  padding: 2rem;
  text-align: center;
  color: #6b7280;
  font-size: 1rem;
}

#business-profile-root.bp-loading .bp-main {
  opacity: 0.6;
  pointer-events: none;
}

/* ==================================================
   Dark mode – Business Profile
   ================================================== */

[data-theme="dark"] #business-profile-root.business-profile-page {
  background: #0f172a;
}

[data-theme="dark"] #business-profile-root .bp-logo-preview {
  border-color: rgba(255, 255, 255, 0.15);
  background: #1e293b;
}

[data-theme="dark"] #business-profile-root .bp-logo-preview .bp-logo-placeholder {
  color: #94a3b8;
}

[data-theme="dark"] #business-profile-root .bp-title {
  color: #f1f5f9;
}

[data-theme="dark"] #business-profile-root .bp-subtitle {
  color: #94a3b8;
}

[data-theme="dark"] #business-profile-root .bp-sidebar {
  border-color: rgba(255, 255, 255, 0.1);
  background: #1e293b;
}

[data-theme="dark"] #business-profile-root .bp-nav-item {
  color: #cbd5e1;
}

[data-theme="dark"] #business-profile-root .bp-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

[data-theme="dark"] #business-profile-root .bp-nav-item.bp-active {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

[data-theme="dark"] #business-profile-root .bp-section {
  border-color: rgba(255, 255, 255, 0.1);
  background: #1e293b;
}

[data-theme="dark"] #business-profile-root .bp-section-title {
  color: #f1f5f9;
}

[data-theme="dark"] #business-profile-root .bp-form-row label {
  color: #94a3b8;
}

[data-theme="dark"] #business-profile-root .bp-form-field input,
[data-theme="dark"] #business-profile-root .bp-form-field textarea {
  border-color: rgba(255, 255, 255, 0.2);
  background: #0f172a;
  color: #f1f5f9;
}

[data-theme="dark"] #business-profile-root .bp-form-field input::placeholder,
[data-theme="dark"] #business-profile-root .bp-form-field textarea::placeholder {
  color: #64748b;
}

[data-theme="dark"] #business-profile-root .bp-char-counter {
  color: #64748b;
}

[data-theme="dark"] #business-profile-root .bp-btn {
  border-color: rgba(255, 255, 255, 0.2);
  background: #1e293b;
  color: #e2e8f0;
}

[data-theme="dark"] #business-profile-root .bp-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] #business-profile-root .bp-btn-primary {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

[data-theme="dark"] #business-profile-root .bp-btn-primary:hover:not(:disabled) {
  background: #2563eb;
  border-color: #2563eb;
}

[data-theme="dark"] #business-profile-root .bp-btn-outline {
  border-color: #60a5fa;
  color: #93c5fd;
}

[data-theme="dark"] #business-profile-root .bp-btn-outline:hover {
  background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] #business-profile-root .bp-sticky-save {
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #business-profile-root .bp-notification-success {
  background: #064e3b;
  color: #6ee7b7;
}

[data-theme="dark"] #business-profile-root .bp-notification-error {
  background: #7f1d1d;
  color: #fca5a5;
}

[data-theme="dark"] #business-profile-root .bp-notification-info {
  background: #1e3a8a;
  color: #93c5fd;
}

[data-theme="dark"] #business-profile-root .bp-signed-out {
  color: #94a3b8;
}
