/* ==========================================================================
   BS Registracija bicikla — front-end
   Tipografija se NE deklarira: nasljeđuje se iz teme.
   Za ugađanje izgleda mijenjaj samo varijable ispod.
   ========================================================================== */

.bsbr {
	--bsbr-accent: #d40000;
	--bsbr-accent-dark: #a80000;
	--bsbr-ink: #231f20;
	--bsbr-muted: #6b7280;
	--bsbr-line: #e3e5ea;
	--bsbr-surface: #ffffff;
	--bsbr-subtle: #f7f8fa;
	--bsbr-radius: 10px;

	color: var(--bsbr-ink);
}

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

.bsbr-card {
	background: var(--bsbr-surface);
	border: 1px solid var(--bsbr-line);
	border-radius: var(--bsbr-radius);
	padding: 28px;
	margin: 0 0 24px;
}

.bsbr-card > :first-child {
	margin-top: 0;
}

.bsbr-card > :last-child {
	margin-bottom: 0;
}

/* --- Naslovi ------------------------------------------------------------ */

.bsbr-title {
	margin: 0 0 4px;
	font-size: 1.35em;
	line-height: 1.25;
}

.bsbr-lede {
	margin: 0 0 24px;
	color: var(--bsbr-muted);
	line-height: 1.55;
}

.bsbr-legend {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 32px 0 16px;
	font-size: .78em;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--bsbr-muted);
}

.bsbr-legend::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--bsbr-line);
}

.bsbr-fieldset {
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.bsbr-fieldset:first-of-type .bsbr-legend {
	margin-top: 0;
}

/* --- Poruke ------------------------------------------------------------- */

.bsbr-notice {
	padding: 14px 18px;
	border-radius: var(--bsbr-radius);
	margin: 0 0 24px;
	border-left: 3px solid;
	line-height: 1.5;
}

.bsbr-notice.bsbr-success {
	background: #edf7f0;
	border-color: #1e8449;
}

.bsbr-notice.bsbr-error {
	background: #fdeeec;
	border-color: var(--bsbr-accent);
}

/* --- Polja -------------------------------------------------------------- */

.bsbr-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 20px;
}

.bsbr-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0 0 18px;
}

.bsbr-grid .bsbr-field {
	margin: 0;
}

.bsbr-field label {
	display: block;
	margin: 0 0 7px;
	font-size: .92em;
	font-weight: 600;
}

.bsbr-req {
	color: var(--bsbr-accent);
	margin-left: 2px;
}

.bsbr-field input[type="text"],
.bsbr-field select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--bsbr-line);
	border-radius: 8px;
	background: var(--bsbr-surface);
	font: inherit;
	color: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.bsbr-field select {
	appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='1.6' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.bsbr-field input[type="text"]:focus,
.bsbr-field select:focus {
	outline: none;
	border-color: var(--bsbr-ink);
	box-shadow: 0 0 0 3px rgba(35, 31, 32, .08);
}

.bsbr-field input[disabled] {
	background: var(--bsbr-subtle);
	color: var(--bsbr-muted);
}

.bsbr-hint {
	margin: 7px 0 0;
	font-size: .85em;
	color: var(--bsbr-muted);
	line-height: 1.45;
}

/* --- Fotografije -------------------------------------------------------- */

.bsbr-photos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.bsbr-photo {
	min-width: 0;
}

.bsbr-photo-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

.bsbr-tile {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	border: 1.5px dashed var(--bsbr-line);
	border-radius: 8px;
	background: var(--bsbr-subtle);
	cursor: pointer;
	overflow: hidden;
	text-align: center;
	transition: border-color .15s ease, background-color .15s ease;
}

.bsbr-tile:hover,
.bsbr-tile.is-drag {
	border-color: var(--bsbr-accent);
	background: #fff;
}

.bsbr-photo-input:focus-visible + .bsbr-tile {
	outline: 2px solid var(--bsbr-ink);
	outline-offset: 2px;
}

.bsbr-tile-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 10px;
	color: var(--bsbr-muted);
	font-size: .82em;
	line-height: 1.3;
}

.bsbr-tile-empty svg {
	width: 26px;
	height: 26px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.4;
}

.bsbr-tile img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bsbr-tile.has-file .bsbr-tile-empty {
	display: none;
}

.bsbr-photo-meta {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin: 7px 0 0;
	font-size: .82em;
	color: var(--bsbr-muted);
}

.bsbr-remove {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: .95em;
	cursor: pointer;
	color: var(--bsbr-accent);
}

.bsbr-remove input {
	margin: 0;
}

/* --- Račun -------------------------------------------------------------- */

.bsbr-doc .bsbr-tile {
	aspect-ratio: auto;
	min-height: 96px;
	padding: 18px;
}

.bsbr-doc .bsbr-tile-empty {
	flex-direction: row;
	gap: 12px;
	font-size: .9em;
	text-align: left;
}

.bsbr-filename {
	font-weight: 600;
	color: var(--bsbr-ink);
	word-break: break-all;
}

/* --- Gumbi -------------------------------------------------------------- */

.bsbr-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin: 28px 0 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--bsbr-line);
}

.bsbr-btn {
	display: inline-block;
	padding: 14px 30px;
	border: 2px solid var(--bsbr-accent);
	border-radius: 8px;
	background: var(--bsbr-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.bsbr-btn:hover,
.bsbr-btn:focus {
	background: var(--bsbr-accent-dark);
	border-color: var(--bsbr-accent-dark);
	color: #fff;
}

.bsbr-btn[disabled] {
	opacity: .6;
	cursor: default;
}

.bsbr-btn-ghost {
	background: transparent;
	color: var(--bsbr-accent);
}

.bsbr-btn-ghost:hover,
.bsbr-btn-ghost:focus {
	background: var(--bsbr-accent);
	color: #fff;
}

.bsbr-link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	color: var(--bsbr-muted);
	text-decoration: underline;
	cursor: pointer;
}

.bsbr-link:hover {
	color: var(--bsbr-accent);
}

/* --- Popis registriranih bicikala --------------------------------------- */

.bsbr-list {
	display: grid;
	gap: 14px;
	margin: 0 0 28px;
}

.bsbr-item {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) auto;
	gap: 18px;
	align-items: center;
	padding: 16px;
	border: 1px solid var(--bsbr-line);
	border-radius: var(--bsbr-radius);
	background: var(--bsbr-surface);
}

.bsbr-thumb {
	width: 84px;
	height: 64px;
	border-radius: 6px;
	background: var(--bsbr-subtle);
	object-fit: cover;
	display: block;
}

.bsbr-thumb-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #c3c7cf;
}

.bsbr-thumb-empty svg {
	width: 26px;
	height: 26px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.4;
}

.bsbr-item-name {
	margin: 0 0 3px;
	font-weight: 700;
	line-height: 1.3;
}

.bsbr-item-meta {
	margin: 0;
	font-size: .87em;
	color: var(--bsbr-muted);
	line-height: 1.5;
}

.bsbr-item-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: .88em;
}

.bsbr-inline {
	display: inline;
}

.bsbr-status {
	display: inline-block;
	padding: 3px 11px;
	border-radius: 100px;
	font-size: .78em;
	font-weight: 700;
	letter-spacing: .02em;
	white-space: nowrap;
}

.bsbr-status-pending {
	background: #fdf3d7;
	color: #7d6608;
}

.bsbr-status-approved {
	background: #e3f5ea;
	color: #186a3b;
}

.bsbr-status-rejected {
	background: #fdeeec;
	color: #922b21;
}

/* --- Prijava ------------------------------------------------------------ */

.bsbr-gate p {
	line-height: 1.6;
}

.bsbr-gate .bsbr-actions {
	border-top: 0;
	padding-top: 0;
	margin-top: 24px;
}

/* --- Honeypot ----------------------------------------------------------- */

.bsbr-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Responzivno -------------------------------------------------------- */

@media (max-width: 640px) {
	.bsbr-card {
		padding: 20px;
	}

	.bsbr-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.bsbr-photos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bsbr-item {
		grid-template-columns: 64px minmax(0, 1fr);
		row-gap: 12px;
	}

	.bsbr-thumb {
		width: 64px;
		height: 52px;
	}

	.bsbr-item-actions {
		grid-column: 1 / -1;
	}

	.bsbr-actions .bsbr-btn {
		flex: 1 1 100%;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bsbr * {
		transition: none !important;
	}
}
