/* Common styles for Beautypassport MVP (skeleton). */

.hidden {
    display: none !important;
}

:root {
  --bp-bg: #f5f5f7;
  --bp-fg: #111827;
  --bp-primary: #2563eb;
  --bp-secondary: #6b7280;
  --bp-radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bp-bg);
  color: var(--bp-fg);
}

.bp-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.bp-button {
  padding: 0.6rem 1.2rem;
  border-radius: var(--bp-radius);
  border: none;
  cursor: pointer;
}

.bp-button.primary {
  background-color: var(--bp-primary);
  color: white;
}

.bp-button.secondary {
  background-color: white;
  color: var(--bp-primary);
  border: 1px solid #d1d5db;
}




/* === Fullscreen loader (общий для стартовой и студии) === */
#bp-fullscreen-loader {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(2px);
  z-index: 900;
  pointer-events: all;
}
#bp-fullscreen-loader.is-active { display: flex; }
#bp-fullscreen-loader .bp-loader-box {
  display: grid;
  gap: 10px;
  place-items: center;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
#bp-fullscreen-loader .bp-loader-text {
  font-size: .95rem;
  color: #111827;
}
.bp-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--bp-primary);
  border-radius: 999px;
  animation: bp-spin 0.8s linear infinite;
}
@keyframes bp-spin { to { transform: rotate(360deg); } }

/* === Диалог камеры === */
#bp-camera-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.35);
  z-index: 950;
}
#bp-camera-modal.is-open { display: flex; }
#bp-camera-modal .bp-cam-panel {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
  margin: auto;
}
#bp-camera-modal .bp-cam-title {
  font-weight: 600;
  margin-bottom: 8px;
}
#bp-camera-modal .bp-cam-view {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
#bp-camera-modal video {
  width: 100%;
  height: auto;
  display: block;
}
#bp-camera-modal .bp-cam-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

/* === Диалог ошибок (самодельный) — точечные стили === */
#bp-error-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.35);
  z-index: 960; /* выше лоадера (900), ниже платежного шита (если у вас 999) */
}
#bp-error-modal.is-open { display: flex; }
#bp-error-modal .bp-err-panel {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
  margin: auto;
}
#bp-error-modal .bp-err-title {
  font-weight: 600;
  margin-bottom: 8px;
}
#bp-error-modal .bp-err-text {
  font-size: .95rem;
  color: #374151;
  white-space: pre-line; /* чтобы переносить hint со \n */
}
#bp-error-modal .bp-err-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
