body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100lvh;
    z-index: -2;
    background-image: url("../images/background.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
	background-blend-mode: lighten;
    opacity: 1;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

/* Bazowy styl zwykłych linków bez domyślnych kolorów przeglądarki. */
:where(a:any-link) {
    color: #9f3f12;
    text-decoration-color: rgba(159, 63, 18, .4);
    text-underline-offset: .16em;
}

:where(a:any-link:hover) {
    color: #c45118;
    text-decoration-color: currentColor;
}

:where(a:any-link:focus-visible) {
    outline: 3px solid rgba(255, 139, 77, .4);
    outline-offset: 2px;
}

.header {
    background: #f0f0f0;
    padding: 1em;
	overflow: visible;
}

.top-row,
.bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.bottom-row {
    justify-content: center;
    margin-top: 0.5em;
    gap: 1em;
}

/* === Przyciski i linki === */
.text-button,
.add-ad-button,
.guest-link {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    background: #ddd;
    padding: 0.5em 1em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    margin-left: 0.5em;
}

/* === Menu użytkownika === */
#auth-box {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    margin-left: .45rem;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.user-menu-trigger:hover,
.user-menu-trigger[aria-expanded="true"] {
    border-color: #f2c2a8;
    background: #fff4ed;
}

.user-menu-trigger:focus-visible {
    outline: 3px solid rgba(255, 139, 77, .4);
    outline-offset: 2px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

.dropdown {
    position: absolute;
    top: calc(100% + .65rem);
    right: 0;
    width: min(16rem, calc(100vw - 1rem));
    padding: .45rem;
    border: 1px solid #ddd;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .2);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    z-index: 1300;
}

.dropdown[hidden] {
    display: none;
}

.dropdown a,
.dropdown .logout-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.55rem;
    margin: 0;
    padding: .65rem .75rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-sizing: border-box;
    text-decoration: none;
    color: #333;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.dropdown a:hover,
.dropdown .logout-button:hover {
    background: #fff4ed;
}

.dropdown form {
    margin: 0;
}

.dropdown .logout-button {
    color: #9f2d20;
}

.content {
    flex: 1 0 auto;
    min-width: 0;
    padding: 1em;
}

.flash-messages {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	max-width: 960px;
	margin: 0 auto 1rem;
}

.flash-message {
	padding: .7rem .9rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #f3f4f6;
	color: #333;
	font-weight: 600;
	transition: opacity .25s ease;
}

.flash-message.is-hiding {
	opacity: 0;
}

.flash-ok {
	border-color: #bbf7d0;
	background: #f0fdf4;
	color: #166534;
}

.flash-error {
	border-color: #fecaca;
	background: #fef2f2;
	color: #991b1b;
}

.beta-feedback-trigger {
	position: fixed;
	left: 1rem;
	bottom: 1rem;
	z-index: 1400;
	padding: .55rem .8rem;
	border: 1px solid #ff8b4d;
	border-radius: 999px;
	background: #fff;
	color: #9a3412;
	box-shadow: 0 4px 14px rgba(0,0,0,.14);
	font: inherit;
	font-size: .85rem;
	font-weight: 700;
	cursor: pointer;
}

.beta-feedback-trigger__icon {
	display: none;
}

@media (max-width: 600px) {
	.beta-feedback-trigger {
		display: grid;
		place-items: center;
		width: 2.5rem;
		height: 2.5rem;
		padding: 0;
		border-radius: 50%;
		font-size: 1rem;
	}

	.beta-feedback-trigger__label {
		display: none;
	}

	.beta-feedback-trigger__icon {
		display: inline;
		font-size: 1.15rem;
		line-height: 1;
	}
}

.feedback-dialog {
	box-sizing: border-box;
	width: min(32rem, calc(100vw - 2rem));
	padding: 1.1rem;
	border: 0;
	border-radius: 14px;
	background: #fff;
	color: #272727;
	box-shadow: 0 18px 50px rgba(0,0,0,.25);
}

.feedback-dialog::backdrop {
	background: rgba(17,24,39,.48);
}

.feedback-dialog__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.feedback-dialog__header h2 {
	margin: 0;
	font-size: 1.25rem;
}

.feedback-dialog__close {
	border: 0;
	background: transparent;
	color: #555;
	font-size: 1.6rem;
	cursor: pointer;
}

.feedback-field {
	display: grid;
	gap: .35rem;
	margin-bottom: .85rem;
	font-weight: 700;
}

.feedback-field select,
.feedback-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: .65rem;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	font: inherit;
}

.feedback-field textarea {
	resize: vertical;
}

.feedback-note,
.feedback-status {
	margin: .5rem 0;
	color: #6b7280;
	font-size: .85rem;
	line-height: 1.4;
}

.feedback-status {
	min-height: 1.2em;
	font-weight: 700;
}

.error-page {
	display: grid;
	place-items: center;
	min-height: 60vh;
}

.error-card {
	box-sizing: border-box;
	width: min(34rem, 100%);
	padding: 2rem;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0,0,0,.08);
	text-align: center;
}

.error-code {
	margin: 0;
	color: #ff8b4d;
	font-size: 2rem;
	font-weight: 800;
}

.error-card h1 {
	margin: .35rem 0 .7rem;
}

.error-actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: .65rem;
	margin-top: 1.25rem;
}

.error-actions a,
.error-actions button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .6rem .9rem;
	border: 1px solid #ff8b4d;
	border-radius: 8px;
	background: #fff;
	color: #9a3412;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.is-hidden {
	display: none;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	border: 0;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	overflow: hidden;
}

@media (max-width: 700px) {
    .top-row {
        flex-direction: row;
        justify-content: space-between;
    }

    .bottom-row {
        flex-direction: column;
        align-items: center;
        gap: 0.5em;
    }

}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100lvh;
    background-color: rgba(255, 255, 255, 0.3); /* im wyższa liczba, tym bledsze tło */
    z-index: -1;
    pointer-events: none;
}

/* Główne przyciski (nie delete) */
button[type="submit"]:not(.delete-btn):not(.contact-button):not(.filter-button):not(.send-button):not(.btn-orange-conversation):not(.logout-button):not(.invitation-action-btn) {
    padding: 0.6em 1em;
    width: 100%;
    background-color: #ff8b4d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
	transition: background-color 0.2s ease-in-out;
}

button[type="submit"]:not(.delete-btn):not(.contact-button):not(.filter-button):not(.send-button):not(.btn-orange-conversation):not(.logout-button):not(.invitation-action-btn):hover {
	background: #e97a3f;
}

/* Przycisk usuwania konta / wylogowania */
button.delete-button {
    margin-top: 1em;
    padding: 0.5em;
    width: 100%;
    background: #ffdddd;
    border: 1px solid #cc0000;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.contact-button {
    background-color: #ff8b4d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.5em 1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.login-required-popup {
    position: fixed;
    top: 1em;
    right: 1em;
    background-color: #e74c3c;
    color: white;
    padding: 0.75em 1.2em;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 0.95em;
    animation: fadeInOut 4s forwards;
}

@keyframes fadeInOut {
    0% {
		opacity: 0;
		transform: translateY(-10px);
	}

    10% {
		opacity: 1;
		transform: translateY(0);
	}

    90% {
		opacity: 1;
	}

    100% {
		opacity: 0;
		transform: translateY(-10px);
	}
}

.notification-center {
  position: relative;
  flex: 0 0 auto;
}

.notification-center[hidden],
.notification-panel[hidden],
.notification-count[hidden] {
  display: none;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #333;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}

.notification-bell:hover,
.notification-bell[aria-expanded="true"] {
  border-color: #f2c2a8;
  background: #fff4ed;
}

.notification-bell:focus-visible {
  outline: 3px solid rgba(255, 139, 77, .4);
  outline-offset: 2px;
}

.notification-bell-icon {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-count {
  position: absolute;
  top: -3px;
  right: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #f0f0f0;
  border-radius: 999px;
  background: #d94b00;
  color: #fff;
  box-sizing: border-box;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.notification-panel {
  position: absolute;
  top: calc(100% + .65rem);
  right: 0;
  width: min(23rem, calc(100vw - 1rem));
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 14px;
  background: #fff;
  color: #272727;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .2);
  z-index: 1300;
}

.notification-panel-header {
  padding: .8rem 1rem;
  border-bottom: 1px solid #ececec;
  background: #fff;
}

.notification-panel-header h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.notification-list {
  max-height: min(28rem, calc(100dvh - 7rem));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-item {
  display: block;
  padding: .72rem .9rem .75rem .8rem;
  border-bottom: 1px solid #ededed;
  border-left: 4px solid transparent;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item.is-unread {
  border-left-color: #ff8b4d;
  background: #fff7f2;
}

.notification-item.is-read {
  color: #666;
}

.notification-item:hover {
  background: #f7f7f7;
}

.notification-item:focus-visible {
  position: relative;
  outline: 3px solid rgba(255, 139, 77, .4);
  outline-offset: -3px;
  z-index: 1;
}

.notification-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d94b00;
  box-shadow: 0 0 0 3px rgba(217, 75, 0, .12);
}

.notification-item-title {
  margin: 0;
  min-width: 0;
  flex: 1;
  color: #2f2f2f;
  font-size: .92rem;
  line-height: 1.35;
}

.notification-item.is-unread .notification-item-title {
  font-weight: 800;
}

.notification-item.is-read .notification-item-title {
  font-weight: 650;
}

.notification-item-body {
  margin: .25rem 0 0;
  font-size: .84rem;
  line-height: 1.4;
}

.notification-item-time {
  display: block;
  margin-top: .38rem;
  color: #777;
  font-size: .75rem;
}

.notification-panel-status {
  margin: 0;
  padding: 2rem 1rem;
  color: #666;
  text-align: center;
}

.notification-panel-error p {
  margin: 0 0 .8rem;
}

.notification-retry {
  padding: .5rem .75rem;
  border: 1px solid #ff8b4d;
  border-radius: 8px;
  background: #fff;
  color: #8f3810;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.notification-retry:hover {
  background: #fff4ed;
}

.notification-retry:focus-visible {
  outline: 3px solid rgba(255, 139, 77, .4);
  outline-offset: 2px;
}

.notification-permission-button {
  border: 0;
  background: transparent;
  color: #333;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.notification-permission-button:disabled {
  cursor: default;
  opacity: .65;
}

@media (max-width: 600px) {
  .notification-panel {
    position: fixed;
    top: 4.25rem;
    right: .5rem;
    left: .5rem;
    width: auto;
  }

  .notification-list {
    max-height: calc(100dvh - 7.5rem);
  }
}


/* ====== Pasek u góry → jedna linia (desktop) ====== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(240,240,240,.96);
  backdrop-filter: blur(6px);
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);

  /* układ z istniejących elementów: .left | .bottom-row | .right */
  display: grid;
  grid-template-areas: "left center right";
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
}

/* chowanie/pojawianie przy scrollu */
.header.hide_topbar {
	display: none;
}

body.embed .content {
	margin-top: 0;
	padding-top: 0;
}

.header .top-row {
	display: contents;
}

.header .left {
	grid-area: left;
	justify-self: start;
}

.header .right {
	display: flex;
	align-items: center;
	grid-area: right;
	justify-self: end;
	gap: .5rem;
}

.bottom-row {
  grid-area: center;
  margin: 0;              /* była przerwa – zbędna w jednej linii */
  gap: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;      /* trzy linki obok siebie */
}

/* kosmetyka linków na środku */
.bottom-row.nav-tabs a {
	text-decoration: none;
	color: #333;
	font-weight: 700;
	padding: .45em .9em;
	border-radius: 6px;
}

.bottom-row.nav-tabs a:hover {
	background-color: #f2f2f2;
	color: #000;
	border: 1px solid #ff8b4d;
}

/* AKTYWNA KARTA — delikatny spadek koloru z góry */
.bottom-row.nav-tabs a.active { 
	 background: linear-gradient(to bottom, #ff9b66 0%, #ff8b4d 62%, #e97a3f 100%); 
	 background-size: 100% 180%; 
	 background-position: top; 
	 color: #fff; 
	 border-radius: 10px; 
	 box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.06); 
}

/* hover aktywnej – lekko „zjeżdża” gradient i odrobinkę przyciemnia */
.bottom-row.nav-tabs a.active:hover { 
	 background-position: center; 
	 filter: brightness(.98); 
	 color: #fff; 
}


/* ukryty domyślnie przycisk hamburger – pokażemy go tylko na mobile */
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: .2rem .4rem;
}

/* ====== Mobile / małe ekrany ====== */
@media (max-width: 1200px) {
	.bottom-row {
		display: none;
	}

	.left .add-ad-button {
		display: none;
	}

	.hamburger {
		display: inline-block;
	}

	.header.is-hidden {
		transform: none;
	}

	.header {
		grid-template-columns: 1fr 1fr auto;
	}

}


@media (max-width: 475px), (min-width: 1201px) and (max-width: 1450px) {
	.bottom-row.nav-tabs a {
		max-width: 100px;
	}

	.header .guest-link {
		max-width: 70px;
	}
}

/* ——— Szuflada ——— */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 78%;
  max-width: 360px;
  height: 100vh;
  background: #fff;
  box-shadow: 2px 0 16px rgba(0,0,0,.18);
  transform: translateX(-100%);
  transition: transform .25s ease;
  padding-top: 3.25rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.mobile-drawer.open {
	transform: translateX(0);
}

.mobile-drawer * {
	box-sizing: border-box;
}

.mobile-drawer hr {
  height: 1px;
  margin: .4rem 0 .8rem;
  border: 0;
  background: linear-gradient(90deg, transparent, #e6e6e6, transparent);
}

.drawer-close {
  position: absolute;
  top: .3rem;
  right: .5rem;
  margin: .3rem;
  border: none;
  background: none;
  font-size: 2rem;
  cursor: pointer;
}

/* ——— Przyciski akcji w szufladzie ——— */
.mobile-drawer .drawer-btn,
.mobile-drawer .drawer-btn[type="submit"] {
  /* reset i unifikacja bez łamania dostępności */
  appearance: none;
  border: 1px solid #e3e3e3;
  background: #f7f7f7;
  color: #333;
  font: inherit;
  text-decoration: none;
  display: block;
  border-color: #ffc9c9;
  width: 100%;
  padding: .7em .9em;
  border-radius: 10px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .02s ease;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.mobile-drawer a.drawer-btn {
	color: inherit;
}

.mobile-drawer .drawer-btn:hover {
	background: #f0f0f0;
}

.mobile-drawer .drawer-btn:active {
	transform: translateY(1px);
}
.mobile-drawer .drawer-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,139,77,.35);
  border-color: #ff8b4d;
}

/* warianty */
.mobile-drawer .drawer-btn--primary {
  border-color: #ff8b4d;
  background: #ff8b4d;
  color: #fff;
}

.mobile-drawer .drawer-btn--primary:hover {
  border-color: #ff7b32;
  background: #ff7b32;
}

.mobile-drawer .drawer-btn--danger {
  border-color: #ffc9c9;
  background: #ffecec;
  color: #a40000;
}

.mobile-drawer .drawer-btn--danger:hover {
	background: #ffe3e3;
}

/* pokonaj globalne button[type=submit] — większa specyficzność */
.mobile-drawer form .drawer-btn[type="submit"] {
  border-color: #e3e3e3;
  background: #f7f7f7;
  color: #333;
}

/* grupy w szufladzie */
.mobile-drawer .drawer-group {
	display: grid;
	gap: .5rem;
}

.mobile-drawer .drawer-footer {
	margin-top: auto;
}

/* drobne */
@media (pointer: coarse) {
	.mobile-drawer .drawer-btn {
		padding: .9em 1em;
	}
}

/* course.css lub main.css */
.guest-header .top-row .left,
.guest-header .top-row .right {
	height: 0;
	visibility: hidden;
}

.guest-badge {
	margin-left: .5rem;
	font-size: .9em;
	opacity: .8;
}

.drawer-btn--return {
	font-weight: 600;
}

.form-footer {
	margin-top: 1rem;       /* odstęp od przycisku */
	padding-top: 0.75rem;   /* trochę luzu nad tekstem */
	border-top: 1px solid #ddd;
	text-align: center;
	font-size: 0.9rem;
	color: #555;
}

.form-footer a {
	color: #ff8b4d;         /* Twój kolor akcentu */
	text-decoration: none;
	font-weight: 500;
}

.form-footer a:hover {
	text-decoration: underline;
}

.brand-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
  position: relative;
	display: block;
	height: 10px;
}

.brand-logo {
	height: 72px;
	width: auto;
	display: block;
	margin-top: 0;
	margin-bottom: -20px;
}

.header {
	overflow: visible;
}

.header .left {
	position: relative;
	overflow: visible;
}



.brand-logo {
	position: absolute;
	left: 0;
	bottom: -22px;
	height: 72px;
	width: auto;
	display: block;
}

