/* Pričaonica */
:root {
	--prc-ink: #2a1838;
	--prc-plum: #6b2d78;
	--prc-mist: #f6f0f9;
	--prc-line: #e4d8ec;
	--prc-muted: #6f6178;
	--prc-call: #15803d;
	--prc-call-dark: #0f6a31;
	--prc-end: #c2353b;
	--prc-radius: 14px;
}

.prc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 22px;
	margin: 28px 0;
}

.prc-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--prc-line);
	border-radius: var(--prc-radius);
	overflow: hidden;
	color: var(--prc-ink);
}

.prc-card__media {
	display: block;
	aspect-ratio: 4 / 5;
	background: var(--prc-mist);
	overflow: hidden;
}

.prc-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.prc-card__initial {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 64px;
	color: var(--prc-plum);
}

.prc-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 16px 16px;
	flex: 1;
}

.prc-card__title {
	margin: 0;
	font-size: 1.15em;
	line-height: 1.25;
}

.prc-card__title a {
	color: inherit;
	text-decoration: none;
}

.prc-card__text {
	margin: 0;
	font-size: 0.92em;
	line-height: 1.5;
	color: var(--prc-muted);
	flex: 1;
}

/* Traka sa dugmetom */
.prc-callbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 10px;
	flex-wrap: wrap;
}

.prc-state {
	font-size: 0.85em;
	color: var(--prc-muted);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.prc-state::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #b9adc1;
}

.prc-state--available { color: var(--prc-call); }
.prc-state--available::before { background: var(--prc-call); box-shadow: 0 0 0 3px rgba(21, 128, 61, .18); }
.prc-state--busy { color: #a15c00; }
.prc-state--busy::before { background: #d98a00; }

/* Dugmad */
.prc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: var(--prc-plum);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	line-height: 1;
}

.prc-btn:hover { filter: brightness(1.08); }
.prc-btn:disabled { opacity: .55; cursor: default; }
.prc-btn:focus-visible, .prc-pkg:focus-visible, .prc-link:focus-visible, .prc-toggle:focus-visible, .prc-input:focus-visible {
	outline: 3px solid #b38bd0;
	outline-offset: 2px;
}

.prc-btn--call { background: var(--prc-call); }
.prc-btn--call:hover { background: var(--prc-call-dark); filter: none; }
.prc-btn--end { background: var(--prc-end); }
.prc-btn--wide { width: 100%; margin-top: 6px; }

.prc-link {
	background: none;
	border: 0;
	padding: 6px 0;
	color: var(--prc-plum);
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* Prozor */
html.prc-lock { overflow: hidden; }

.prc-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.prc-modal[hidden] { display: none; }

.prc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(42, 24, 56, .55);
}

.prc-modal__box {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	background: #fff;
	color: var(--prc-ink);
	border-radius: 20px;
	padding: 24px 24px 18px;
	box-shadow: 0 24px 60px rgba(42, 24, 56, .35);
	font-size: 16px;
	line-height: 1.45;
}

.prc-x {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--prc-mist);
	color: var(--prc-ink);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.prc-who {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 40px 18px 0;
}

.prc-who__img {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--prc-mist) center / cover no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--prc-plum);
	font-size: 24px;
}

.prc-who__label { margin: 0; font-size: .85em; color: var(--prc-muted); }
.prc-who__name { margin: 0; font-size: 1.3em; line-height: 1.2; }

.prc-label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
}

.prc-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #cbbbd6;
	border-radius: 10px;
	background: #fff;
	color: var(--prc-ink);
	font: inherit;
	font-size: 18px;
	letter-spacing: .04em;
}

.prc-error { color: var(--prc-end); margin: 8px 0 0; min-height: 0; }
.prc-error:empty { display: none; }

.prc-balance {
	margin: 10px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #eaf6ee;
	color: #11592b;
	font-weight: 600;
}

.prc-balance--empty { background: #fbecec; color: #8f2328; }

.prc-buy { margin: 14px 0 0; font-size: .95em; }
.prc-buy a { color: var(--prc-plum); font-weight: 600; }

.prc-status { margin: 4px 0 0; text-align: center; font-weight: 600; color: var(--prc-plum); }
.prc-timer { margin: 4px 0; text-align: center; font-size: 46px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.prc-left { margin: 0 0 14px; text-align: center; color: var(--prc-muted); }
.prc-left--low { color: var(--prc-end); font-weight: 600; }

.prc-msg { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fbecec; color: #8f2328; }
.prc-msg:empty { display: none; }

.prc-packages { display: grid; gap: 10px; margin-bottom: 8px; }

.prc-pkg {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid var(--prc-line);
	border-radius: 12px;
	background: var(--prc-mist);
	color: var(--prc-ink);
	font: inherit;
	cursor: pointer;
	text-align: left;
}

.prc-pkg:hover { border-color: var(--prc-plum); }
.prc-pkg__min { font-size: 1.2em; font-weight: 700; }
.prc-pkg__price { font-weight: 600; color: var(--prc-plum); }

.prc-chosen { margin: 0 0 12px; font-weight: 600; }

.prc-pay { margin: 0 0 12px; border-top: 1px solid var(--prc-line); }
.prc-pay > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--prc-line); }
.prc-pay dt { color: var(--prc-muted); }
.prc-pay dd { margin: 0; font-weight: 600; text-align: right; }
.prc-pay__ref dd { font-size: 1.5em; letter-spacing: .08em; color: var(--prc-plum); }
.prc-after { margin: 0 0 6px; }

.prc-notice {
	margin: 16px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--prc-line);
	font-size: .8em;
	line-height: 1.45;
	color: var(--prc-muted);
}

.prc-notice a { color: inherit; }

/* Panel pričalice */
.prc-panel { max-width: 900px; margin: 0 auto; color: var(--prc-ink); }
.prc-panel--login { max-width: 380px; margin: 40px auto; }
.prc-login { display: grid; gap: 8px; padding: 24px; border: 1px solid var(--prc-line); border-radius: var(--prc-radius); background: #fff; }
.prc-login h2 { margin: 0 0 8px; }

.prc-panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.prc-panel__hello { margin: 0; }
.prc-panel__sub { margin: 4px 0 0; color: var(--prc-muted); font-size: .92em; }
.prc-panel__actions { display: flex; align-items: center; gap: 14px; }
.prc-panel__row { display: flex; justify-content: space-between; align-items: baseline; }

.prc-toggle {
	min-height: 44px;
	padding: 0 22px;
	border: 2px solid #cbbbd6;
	border-radius: 999px;
	background: #fff;
	color: var(--prc-muted);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.prc-toggle--on { border-color: var(--prc-call); background: var(--prc-call); color: #fff; }

.prc-live {
	padding: 22px;
	border-radius: var(--prc-radius);
	background: var(--prc-mist);
	border: 1px solid var(--prc-line);
	margin-bottom: 24px;
}

.prc-live--ringing { background: #fff; border: 2px solid var(--prc-call); animation: prc-pulse 1.4s ease-in-out infinite; }
.prc-live--call { background: #fff; border: 2px solid var(--prc-plum); }

@keyframes prc-pulse {
	50% { box-shadow: 0 0 0 8px rgba(21, 128, 61, .15); }
}

@media (prefers-reduced-motion: reduce) {
	.prc-live--ringing { animation: none; }
}

.prc-live__idle { margin: 0; font-weight: 600; }
.prc-ring { display: flex; align-items: center; gap: 16px; }
.prc-ring .prc-who__img { width: 72px; height: 72px; }
.prc-ring__profile { margin: 0; font-size: 1.4em; font-weight: 700; }
.prc-ring__customer { margin: 2px 0 0; color: var(--prc-muted); }
.prc-ring__btns { display: flex; gap: 12px; margin-top: 16px; }
.prc-ring__btns .prc-btn { flex: 1; min-height: 52px; font-size: 1.05em; }
.prc-live .prc-timer { text-align: left; }
.prc-live .prc-left { text-align: left; }

.prc-notes { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--prc-line); }
.prc-notes h3 { margin: 0 0 4px; font-size: 1.05em; }
.prc-notes__hint { margin: 0 0 10px; font-size: .88em; color: var(--prc-muted); }
.prc-notes__list { list-style: none; margin: 0 0 12px; padding: 0; max-height: 260px; overflow: auto; }
.prc-notes__list li { padding: 8px 0; border-bottom: 1px solid var(--prc-line); }
.prc-notes__list p { margin: 0; white-space: pre-wrap; }
.prc-notes__meta { font-size: .8em; color: var(--prc-muted); }
.prc-notes__empty { color: var(--prc-muted); }
.prc-notes__input { font-size: 16px; letter-spacing: 0; min-height: 80px; margin-bottom: 8px; }

.prc-panel__block { margin-bottom: 28px; }
.prc-panel__block h3 { margin: 0 0 10px; }

.prc-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.prc-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--prc-mist); font-weight: 600; }
.prc-chips img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

.prc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.prc-stats > div { padding: 14px 16px; border: 1px solid var(--prc-line); border-radius: 12px; }
.prc-stats p { margin: 0; }
.prc-stats__k { color: var(--prc-muted); font-size: .88em; }
.prc-stats__v { font-size: 1.35em; font-weight: 700; }
.prc-stats__s { color: var(--prc-muted); font-size: .88em; }

.prc-table-wrap { overflow-x: auto; }
.prc-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.prc-table th, .prc-table td { padding: 8px 10px; border-bottom: 1px solid var(--prc-line); text-align: left; white-space: nowrap; }
.prc-table th { color: var(--prc-muted); font-weight: 600; }

@media (max-width: 480px) {
	.prc-modal { align-items: flex-end; padding: 0; }
	.prc-modal__box { max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh; }
	.prc-timer { font-size: 40px; }
}

/* ---------- Panel kao aplikacija (telefon) ---------- */
body.prc-app {
	margin: 0;
	background: var(--prc-mist);
	color: var(--prc-ink);
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	-webkit-text-size-adjust: 100%;
}

.prc-app__main {
	padding: max(16px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
}

.prc-app .prc-panel__block,
.prc-app .prc-live {
	background: #fff;
	border: 1px solid var(--prc-line);
	border-radius: var(--prc-radius);
	padding: 16px;
}

.prc-app .prc-panel__hello { font-size: 1.4em; }
.prc-app h3 { font-size: 1.1em; }
.prc-app .prc-login { margin-top: 10vh; }

.prc-tip {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 10px;
	background: #fff6e0;
	color: #6b4a00;
	font-size: .9em;
}

@media (min-width: 761px) {
	.prc-tip { display: none; }
}

@media (max-width: 760px) {
	.prc-panel__head { flex-direction: column; align-items: stretch; }
	.prc-panel__actions { justify-content: space-between; }
	.prc-toggle { flex: 1; min-height: 52px; font-size: 1.05em; }

	/* Dolazni poziv preko celog ekrana, kao na telefonu */
	.prc-live--ringing {
		position: fixed;
		inset: 0;
		z-index: 100000;
		margin: 0;
		border: 0;
		border-radius: 0;
		overflow-y: auto;
		background: var(--prc-ink);
		color: #fff;
		padding: calc(32px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
		animation: none;
	}
	.prc-live--ringing .prc-ring { flex-direction: column; text-align: center; gap: 12px; }
	.prc-live--ringing .prc-who__img { width: 120px; height: 120px; font-size: 48px; }
	.prc-live--ringing .prc-who__label,
	.prc-live--ringing .prc-ring__customer,
	.prc-live--ringing .prc-notes__hint,
	.prc-live--ringing .prc-notes__meta { color: #d9cbe3; }
	.prc-live--ringing .prc-ring__profile { font-size: 1.8em; }
	.prc-live--ringing .prc-ring__btns { margin-top: 28px; }
	.prc-live--ringing .prc-ring__btns .prc-btn { min-height: 64px; font-size: 1.15em; }
	.prc-live--ringing .prc-notes { border-color: rgba(255, 255, 255, .2); }
	.prc-live--ringing .prc-notes__list li { border-color: rgba(255, 255, 255, .15); }

	/* U razgovoru: veliko dugme za prekid uvek pri dnu */
	.prc-live--call [data-op="hangup"] {
		position: sticky;
		bottom: calc(10px + env(safe-area-inset-bottom));
		width: 100%;
		min-height: 58px;
		font-size: 1.1em;
		z-index: 2;
	}
	.prc-live--call .prc-timer { text-align: center; }
	.prc-live--call .prc-left { text-align: center; }

	.prc-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
	.prc-stats > div { padding: 10px; }
	.prc-stats__v { font-size: 1.05em; }
	.prc-table th, .prc-table td { padding: 7px 8px; }
}

/* ---------- Oglasi profila [pricaonica_profili] ---------- */
.prc-ads {
	display: grid;
	grid-template-columns: repeat(var(--prc-cols, 3), minmax(0, 1fr));
	gap: 28px 22px;
	margin: 32px 0;
}

.prc-ad {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--prc-line);
	border-radius: 22px;
	overflow: hidden;
	color: var(--prc-ink);
	transition: border-color .2s, transform .2s;
}

.prc-ad:hover { border-color: #cdb4dc; transform: translateY(-2px); }

.prc-ad__media {
	position: relative;
	aspect-ratio: 4 / 5;
	background: linear-gradient(160deg, #e9dcf1, #f6f0f9);
	overflow: hidden;
}

.prc-ad__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.prc-ad__initial {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 96px;
	color: var(--prc-plum);
}

.prc-ad__media::after {
	content: "";
	position: absolute;
	inset: 45% 0 0;
	background: linear-gradient(to top, rgba(42, 24, 56, .88), rgba(42, 24, 56, 0));
	pointer-events: none;
}

.prc-ad__name {
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 16px;
	z-index: 1;
	margin: 0;
	font-size: 1.6em;
	line-height: 1.15;
	letter-spacing: -.01em;
}

.prc-ad__name a { color: #fff; text-decoration: none; }
.prc-ad__name a:hover { text-decoration: underline; text-underline-offset: 4px; }

.prc-ad .prc-state {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 1;
	padding: 6px 12px 6px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	color: var(--prc-ink);
	font-size: .82em;
	font-weight: 600;
}

.prc-ad__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px 20px 20px;
	flex: 1;
}

.prc-ad__text {
	font-size: .97em;
	line-height: 1.6;
	color: #4a3d55;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--prc-lines, 6);
	overflow: hidden;
}

.prc-ad__text[data-full], .prc-ad__text.is-open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.prc-ad__text p { margin: 0 0 .7em; }
.prc-ad__text p:last-child { margin-bottom: 0; }

.prc-ad__more {
	align-self: flex-start;
	padding: 0;
	border: 0;
	background: none;
	color: var(--prc-plum);
	font: inherit;
	font-size: .92em;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.prc-ad__call {
	margin-top: auto;
	width: 100%;
	min-height: 52px;
	font-size: 1.05em;
}

@media (max-width: 960px) {
	.prc-ads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.prc-ads[style*="--prc-cols:1"] { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	.prc-ads { grid-template-columns: 1fr; gap: 20px; }
	.prc-ad__name { font-size: 1.45em; }
}

@media (prefers-reduced-motion: reduce) {
	.prc-ad, .prc-ad:hover { transition: none; transform: none; }
}
