/* zmenek.net 2026 redesign (Polaroid), see docs/superpowers/specs/2026-11-02-zmenek-polaroid-design.md
   The account pages (Pages: Login, Register, Lost password, the success pages, Moj kotiček, Add and edit profile):
   the form card and its plate, the table-to-block layout, fields, autofill and the file input, brown and danger
   buttons, .error, the AdSense frame, the account print and its actions, and the success card. */

/* ---------------------------------------------------------------- The form card (an index card with a brown plate) */
.mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas) {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 26px 24px;
  border-radius: 3px;
  background: var(--cream) var(--damask-cream) repeat;
  box-shadow: var(--shadow-print);
}
.mod_article:is(#moj-profil, #dodaj-svoj-oglas) { max-width: 760px; }
/* the pin, centred on the top edge */
.mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas)::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--pin);
  box-shadow: 0 3px 4px rgba(40,8,20,.45);
}
.mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas) > .ce_text {
  margin: 0 -26px 20px;
  padding: 20px 26px 16px;
  border-radius: 3px 3px 0 0;
  border-bottom: 3px solid var(--orange);
  background: linear-gradient(180deg, rgba(63,37,41,.35), rgba(43,24,26,.55)), var(--brown) var(--damask-brown) center / cover;
}
/* h3 on login, register, account, add and edit; h1 on lost password (the source capitals as printed).
   Outranks the listing heading (#mainContent .ce_text h3 in zn2026-list.css). */
.mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas) > .ce_text :is(h1, h3) {
  margin: 0;
  font: 800 26px/1.15 var(--head);
  color: #fff;
  text-shadow: none;
}
.mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas) > .ce_text h3 span { color: var(--orange); }
#izgubljeno-geslo > .s_headline p { margin-top: 8px; font: 400 15px/1.5 var(--body); color: var(--on-brown); }
/* the cream card takes the brown ring (zero specificity: the rules below for the account print win) */
:where(.mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas)) :focus-visible {
  outline: 2px solid var(--brown-deep);
  outline-offset: 2px;
  box-shadow: none;
}

/* ---------------------------------------------------------------- Table layout without changing the table */
:is(#tl_login, #tl_registration, #tl_catalog_items) :is(table, tbody, tr, td) { display: block; }
:is(#tl_login, #tl_registration) tr { margin-bottom: 14px; }
:is(#tl_login, #tl_registration) tr:last-child { margin-bottom: 0; }
:is(#tl_login, #tl_registration, #tl_catalog_items) td.col_0 {
  margin-bottom: 6px;
  font: 700 14px/1.3 var(--body);
  color: var(--brown);
}
/* the submit row's empty label cell (&nbsp;) */
:is(#tl_login, #tl_registration) tr.row_last > td.col_0,
#tl_catalog_items tr.last_row > td.col_0 { display: none; }
/* lost password: div.widget rows */
#tl_lost_password .widget { margin-bottom: 14px; }
#tl_lost_password .widget label {
  display: block;
  margin-bottom: 6px;
  font: 700 14px/1.3 var(--body);
  color: var(--brown);
}
.mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas) span.mandatory { margin-left: 2px; color: var(--error); }

/* ---------------------------------------------------------------- Fields */
/* The field list sits in :where() so this rule stays (1,0,0) and the select / textarea rules below (1,0,1) win. */
:is(#tl_login, #tl_registration, #tl_lost_password, #tl_catalog_items) :where(input.text, input[type="email"], input[type="password"], select, textarea) {
  display: block;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 3px;
  background-color: var(--paper);   /* a colour only: the key icon inline on the lost-password fields stays */
  color: var(--ink);
  font: 500 16px/1.3 var(--body);
}
:is(#tl_login, #tl_registration, #tl_lost_password, #tl_catalog_items) select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background: var(--icon-chevron) right 12px center / 20px no-repeat, var(--paper);
  cursor: pointer;
}
:is(#tl_login, #tl_registration, #tl_lost_password, #tl_catalog_items) textarea {
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}
#tl_catalog_items #ctrl_description { min-height: 140px; }   /* the inline height:100px stays */
:is(#tl_login, #tl_registration, #tl_lost_password, #tl_catalog_items) input:-webkit-autofill {
  box-shadow: inset 0 0 0 40px #fff;
  -webkit-text-fill-color: var(--ink);
}
/* the file input: Karla, with a brown button */
#tl_catalog_items input[type="file"] {
  display: block;
  max-width: 100%;
  min-height: 44px;
  font: 400 15px/1.4 var(--body);
  color: var(--ink);
}
#tl_catalog_items input[type="file"]::file-selector-button {
  min-height: 44px;
  margin-right: 12px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: var(--brown);
  color: #fff;
  font: 700 16px/1 var(--head);
  cursor: pointer;
}

/* ---------------------------------------------------------------- Buttons: orange stays on brown, so cream cards use brown */
:is(#tl_login, #tl_registration, #tl_lost_password, #tl_catalog_items) input.submit {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 4px;
  background: var(--brown);
  color: #fff;
  font: 700 17px/1 var(--head);
  cursor: pointer;
}

/* ---------------------------------------------------------------- Errors (login and lost password p.error, register div.error; add and edit) */
.formbody > .error,
#tl_catalog_items > p.error {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-left: 4px solid var(--error);
  background: rgba(255,255,255,.8);
  color: var(--error);
  font: 700 15px/1.4 var(--body);
}

/* ---------------------------------------------------------------- Register: the hidden phone row and the agreement row */
#tl_registration tr.row_7 { display: none; }
#tl_registration tr.row_8 td.col_1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 44px;
  font: 400 16px/1.4 var(--body);
  color: var(--ink);
}
#tl_registration #ctrl_agreement {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0 10px 0 0;
  accent-color: var(--brown);
  cursor: pointer;
}
#tl_registration .agreement_check_text { margin-right: .28em; cursor: pointer; }   /* flex drops the space before the link */
#tl_registration .agreement_text,
#tl_registration .agreement_text p { display: inline; }
#tl_registration .agreement_text a {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------------------------------------------------------------- AdSense: a neutral frame, shown only with consent (Q6) */
.adSpace_03,
aside .adslot { display: none; }
html.consent-all .adSpace_03,
html.consent-all aside .adslot {
  display: block;
  max-width: 728px;
  margin: 32px auto 0;
  padding: 12px;
  border: 1px solid var(--fact-line);
  background: rgba(255,255,255,.9);
}

/* ---------------------------------------------------------------- Moj kotiček: the account print and its actions */
#moj-profil .userEditPageList {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
#moj-profil .userEditPageList .print { --tilt: -1deg; }
/* on the cream card: the brown ring, not the white one */
.userEditPageList .print:focus-visible {
  outline: 2px solid var(--brown-deep);
  outline-offset: 2px;
  box-shadow: var(--shadow-print);
}
#moj-profil .pEdit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
#moj-profil .pEdit br,
#moj-profil .mod_cataloglist > br { display: none; }
#moj-profil .pEdit a:not(.delete),
#moj-profil .addUrl a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 4px;
  background: var(--brown);
  color: #fff;
  font: 700 16px/1 var(--head);
  text-decoration: none;
}
/* still plain GET links with no confirm (approved): a clear danger style */
#moj-profil a.delete {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--error);
  border-radius: 4px;
  background: var(--paper);
  color: var(--error);
  font: 700 16px/1 var(--head);
  letter-spacing: normal;
  text-decoration: none;
}
#moj-profil p.info { margin-top: 14px; font: 400 16px/1.5 var(--body); color: var(--ink-2); }
#moj-profil .editBox001:has(a) {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #d9b9c6;
}

/* ---------------------------------------------------------------- Add and edit profile: two columns */
#tl_catalog_items tbody {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
}
#tl_catalog_items tr.row_6,
#tl_catalog_items tr.row_7,
#tl_catalog_items tr.last_row { grid-column: 1 / -1; }
#tl_catalog_items tr.row_8 { display: none; }
#tl_catalog_items .submit_container { display: flex; flex-wrap: wrap; gap: 12px; }
#tl_catalog_items #goBack {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 2px solid var(--brown);
  border-radius: 4px;
  background: transparent;
  color: var(--brown);
  font: 700 17px/1 var(--head);
  text-decoration: none;
}

/* ---------------------------------------------------------------- The success card (lost password, registration and activation success) */
.msg_successful {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 28px 30px;
  border-radius: 4px;
  background: var(--brown) var(--damask-brown) center / cover;
  color: var(--on-brown);
  text-align: center;
  box-shadow: var(--shadow-print);
}
.msg_successful::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--pin);
  box-shadow: 0 3px 4px rgba(40,8,20,.45);
}
.msg_successful .ico span {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--orange) center / 30px no-repeat;
}
/* a check (activation, password updated) and an envelope (registration, link sent), in --brown-deep */
.msg_successful .ico_2 span {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b181a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.msg_successful .ico_1 span {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b181a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='1.5'/%3E%3Cpath d='M3.5 6.5l8.5 6.5 8.5-6.5'/%3E%3C/svg%3E");
}
.msg_successful h1 { margin-bottom: 8px; font: 800 28px/1.15 var(--head); color: #fff; }
.msg_successful p { font: 400 16px/1.55 var(--body); }
/* "Prijavi se": the .btn--fill look, orange on brown */
.msg_successful a.btn_x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 16px;
  padding: 0 18px;
  border: 2px solid var(--orange);
  border-radius: 4px;
  background: var(--orange);
  color: var(--brown-deep);
  font: 700 16px/1 var(--head);
  letter-spacing: .02em;
  text-decoration: none;
}
/* the two success pages have no search band: the card sits 24px below the header's 5px paper edge */
body.bodyPages_x2 main.page:not(:has(> #topBox)) { padding-top: 29px; }

/* ---------------------------------------------------------------- Phones */
@media (max-width: 680px) {
  .mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas) { padding: 0 18px 20px; }
  .mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas) > .ce_text { margin: 0 -18px 18px; padding: 18px 18px 14px; }
  .mod_article:is(#prijavi-se, #registriraj-se, #izgubljeno-geslo, #moj-profil, #dodaj-svoj-oglas) > .ce_text :is(h1, h3) { font-size: 24px; }
  #moj-profil .userEditPageList { grid-template-columns: minmax(0, 1fr); }
  #moj-profil .userEditPageList .profileBox { justify-self: center; width: 200px; }
  #tl_catalog_items tbody { grid-template-columns: minmax(0, 1fr); }
  .msg_successful { padding: 26px 18px 26px; }
  .msg_successful h1 { font-size: 26px; }
}

/* ---------------------------------------------------------------- Hover (pointer devices only) */
@media (hover: hover) {
  :is(#tl_login, #tl_registration, #tl_lost_password, #tl_catalog_items) input.submit:hover { background: var(--brown-deep); }
  #tl_catalog_items input[type="file"]:hover::file-selector-button { background: var(--brown-deep); }
  #tl_catalog_items #goBack:hover { background: rgba(63,37,41,.08); }
  #tl_registration .agreement_text a:hover { color: var(--brown); }
  #moj-profil .pEdit a:not(.delete):hover,
  #moj-profil .addUrl a:hover { background: var(--brown-deep); }
  #moj-profil a.delete:hover { background: var(--error); color: #fff; }
  .userEditPageList .print:hover:focus-visible { box-shadow: var(--shadow-lift); }
  .msg_successful a.btn_x:hover { border-color: var(--orange-lt); background: var(--orange-lt); }
}
