/* ==========================================================================
   Rezervirano.mk — product brand layer
   Edition 1.2 · November 2026

   Loaded after public.css and dashboard.css. It carries the parts of the
   brand book that are behaviour rather than colour: the typeface stack, the
   tonal-iris mark tile, and the motion system (fast, short, reduced-motion
   aware). Palette values live in tokens.css and the component styles.
   ========================================================================== */

/* --- Typeface -----------------------------------------------------------
   Inter when the site loads it, the system UI stack otherwise. The plugin
   deliberately ships no font files.
   ---------------------------------------------------------------------- */

body.bmp-public,
body.bmp-app,
body.bmp-public button,
body.bmp-public input,
body.bmp-public select,
body.bmp-public textarea,
body.bmp-app button,
body.bmp-app input,
body.bmp-app select,
body.bmp-app textarea {
	font-family: var(--bmp-font-sans);
}

.bmp-app ::selection,
.bmp-public ::selection {
	background: rgba(64, 92, 240, 0.18);
	color: var(--bmp-ink);
}

/* --- Logo tile ----------------------------------------------------------
   The initial fallback for tenants without a logo becomes the brand mark:
   one tonal-iris ramp, white letter, soft iris glow.
   ---------------------------------------------------------------------- */

.bmp-app .bmp-brand-mark,
.bmp-public .bmp-brand-mark {
	background: var(--bmp-gradient);
	background-size: 140% 140%;
	background-position: 0 0;
	box-shadow: 0 6px 16px rgba(64, 92, 240, 0.28);
	transition: background-position var(--bmp-duration-enter) var(--bmp-ease);
}

.bmp-app .bmp-brand:hover .bmp-brand-mark,
.bmp-public .bmp-public-logo:hover .bmp-brand-mark {
	background-position: 100% 100%;
}

/* --- Controls -----------------------------------------------------------
   The book sets app buttons at 40px / 10px radius (44px on touch).
   ---------------------------------------------------------------------- */

.bmp-main .bmp-btn {
	min-height: 40px;
	border-radius: var(--bmp-radius-md);
}

.bmp-main .bmp-btn--small {
	min-height: 30px;
	border-radius: var(--bmp-radius-sm);
}

@media (pointer: coarse) {
	.bmp-main .bmp-btn {
		min-height: 44px;
	}
}

/* Phones: let wide tables scroll inside their card instead of crushing the
   columns. The wrap already owns overflow-x. */
@media (max-width: 600px) {
	.bmp-main .bmp-table:not(.bmp-table--stack) {
		min-width: 520px;
	}
}

/* --- Status -------------------------------------------------------------
   The book pairs every status with a dot so colour is never the only signal.
   ---------------------------------------------------------------------- */

.bmp-status {
	gap: 6px;
}

.bmp-status::before {
	content: "";
	width: 6px;
	height: 6px;
	flex: 0 0 6px;
	border-radius: 50%;
	background: currentColor;
}

/* --- Motion -------------------------------------------------------------
   Everything is opt-in behind prefers-reduced-motion. Durations come from
   the token set: 120ms for response, 180ms for surfaces, 240ms for entry.
   ---------------------------------------------------------------------- */

@keyframes bmp-rise {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes bmp-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: no-preference) {
	/* Page entry: content children rise in a short stagger. */
	.bmp-content > * {
		animation: bmp-rise var(--bmp-duration-enter) var(--bmp-ease-out) both;
	}

	.bmp-content > *:nth-child(2) {
		animation-delay: 30ms;
	}

	.bmp-content > *:nth-child(3) {
		animation-delay: 60ms;
	}

	.bmp-content > *:nth-child(4) {
		animation-delay: 90ms;
	}

	.bmp-content > *:nth-child(5) {
		animation-delay: 120ms;
	}

	.bmp-content > *:nth-child(6) {
		animation-delay: 150ms;
	}

	/* Surfaces answer the pointer without moving the layout. */
	.bmp-main .bmp-card {
		transition:
			border-color var(--bmp-duration-base) var(--bmp-ease),
			box-shadow var(--bmp-duration-base) var(--bmp-ease);
	}

	.bmp-main .bmp-card:hover {
		border-color: var(--bmp-line-strong);
		box-shadow: var(--bmp-shadow-2);
	}

	/* Buttons: colour in 120ms, a 1px press. */
	.bmp-main .bmp-btn,
	.bmp-public .bmp-btn {
		transition:
			background-color var(--bmp-duration-micro) var(--bmp-ease),
			border-color var(--bmp-duration-micro) var(--bmp-ease),
			color var(--bmp-duration-micro) var(--bmp-ease),
			box-shadow var(--bmp-duration-base) var(--bmp-ease),
			transform var(--bmp-duration-instant) var(--bmp-ease);
	}

	.bmp-main .bmp-btn:active,
	.bmp-public .bmp-btn:active {
		transform: translateY(1px);
	}

	.bmp-main .bmp-btn--primary:hover,
	.bmp-public .bmp-btn--primary:hover {
		box-shadow: var(--bmp-shadow-glow);
	}

	/* Navigation: the icon leads the row by 2px on hover. */
	.bmp-nav-link {
		transition:
			background-color var(--bmp-duration-micro) var(--bmp-ease),
			color var(--bmp-duration-micro) var(--bmp-ease);
	}

	.bmp-nav-item .bmp-icon {
		transition:
			color var(--bmp-duration-base) var(--bmp-ease),
			transform var(--bmp-duration-base) var(--bmp-ease);
	}

	.bmp-nav-link:hover .bmp-icon {
		transform: translateX(2px);
	}

	/* Table rows: a calm hover, no zebra business. */
	.bmp-table tbody tr {
		transition: background-color var(--bmp-duration-micro) var(--bmp-ease);
	}

	/* Existing overlays pick up the token easing. */
	.bmp-toast {
		animation-duration: var(--bmp-duration-enter);
		animation-timing-function: var(--bmp-ease-out);
	}

	.bmp-toast.is-leaving {
		transition-duration: var(--bmp-duration-exit);
		transition-timing-function: var(--bmp-ease);
	}

	.bmp-modal-panel {
		animation-duration: var(--bmp-duration-enter);
		animation-timing-function: var(--bmp-ease-out);
	}

	/* Any icon flagged busy turns instead of pulsing. */
	.bmp-btn.is-loading .bmp-icon,
	.bmp-icon--spin {
		animation: bmp-spin 800ms linear infinite;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bmp-content > *,
	.bmp-toast,
	.bmp-modal-panel,
	.bmp-icon--spin,
	.bmp-btn.is-loading .bmp-icon {
		animation: none !important;
	}
}
