/* Ugglix — "Anslagstavlan"-temat. Delad stylesheet för index.php, annons.php
   och lagg-upp.php så vi slipper tre kopior av samma CSS. */

/* Självhostade typsnitt (istället för Google Fonts-länken, som hängde sig
   ofta). Bara "latin"-delmängden behövs — å/ä/ö täcks av den (U+0000-00FF).
   Caveat och Nunito är variabla typsnitt hos Google — samma fil täcker alla
   vikter vi använder, precis som i deras egen genererade CSS. */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/fonts/caveat-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/nunito-latin.woff2") format("woff2");
}

body {
  background: #d9c7a3;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,.06) 1px, transparent 0);
  background-size: 14px 14px;
  font-family: "Nunito", system-ui, sans-serif;
  color: #3d2f1f;
}

.navbar-cork { background: #3d2f1f; }
.brand-hand { font-family: "Caveat", cursive; font-size: 2rem; color: #ffd76a; text-decoration: none; }
.hand-title { font-family: "Caveat", cursive; font-weight: 700; font-size: 2.4rem; color: #3d2f1f; margin: 0; }

.note-card {
  background: #fffdf3;
  box-shadow: 0 6px 14px rgba(0,0,0,.2);
  padding: 1.25rem;
  position: relative;
  text-decoration: none;
  color: #3d2f1f;
  display: block;
}
.note-card::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 50px; height: 22px;
  background: rgba(255,215,106,.85);
  border: 1px solid rgba(0,0,0,.05);
}
.rot-1 { transform: rotate(-2deg); }
.rot-2 { transform: rotate(1.5deg); }
.rot-3 { transform: rotate(-1deg); }
.rot-4 { transform: rotate(2deg); }
.empty-note { max-width: 340px; }

.note-thumb {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  width: 100%;
  border-radius: .15rem;
  margin-bottom: .5rem;
  background: #eee6d3;
}

.kommun-pin {
  background: #fffdf3;
  border-radius: .25rem;
  padding: .6rem .9rem;
  box-shadow: 0 3px 8px rgba(0,0,0,.18);
  text-decoration: none;
  color: #3d2f1f;
  font-weight: 700;
  display: inline-block;
  font-size: .9rem;
}
.kommun-pin.big { background: #fff3d6; }
.kommun-pin.active { background: #c0392b; color: #fffdf3; }
.kommun-pin.active .pushpin { background: #ffd76a; }
.kommun-pin.is-hover-linked { background: #f3c76b; }

.pushpin {
  display: inline-block;
  width: 10px; height: 10px;
  background: #c0392b;
  border-radius: 50%;
  margin-right: .35rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.price-tag { color: #a13c1c; font-weight: 800; }
.price-sticker {
  display: inline-block;
  background: #c0392b;
  color: #fffdf3;
  font-weight: 800;
  font-size: 1.4rem;
  padding: .3rem 1rem;
  transform: rotate(-3deg);
  box-shadow: 0 4px 8px rgba(0,0,0,.25);
}

.tag-chip {
  background: #fff3d6;
  border: 1px solid #e8cf9c;
  border-radius: .3rem;
  padding: .2rem .6rem;
  font-size: .82rem;
  font-weight: 700;
}

.search-note {
  background: #fffdf3;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
  padding: 0 .5rem .25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: 380px;
}
.search-note input { border: none; background: transparent; flex: 1; min-width: 0; }
.search-note input:focus { outline: none; box-shadow: none; }

.btn-tape {
  background: #ffd76a; border: none; color: #3d2f1f; font-weight: 800;
  border-radius: 0; padding: .6rem 1.4rem; box-shadow: 0 4px 0 #c9a83f;
}
.btn-tape:hover { background: #ffcb3d; color: #3d2f1f; }
.btn-tape:disabled { opacity: .55; box-shadow: none; }
.btn-outline-tape { background: transparent; border: 2px solid #6b4a2b; color: #3d2f1f; font-weight: 700; }
.btn-outline-tape:hover { background: #6b4a2b; color: #fffdf3; }

/* Hero-polaroid (index.php) — en enskild rubrikbild med bildtext */
.polaroid {
  background: #fffdf3;
  padding: .6rem .6rem 1.4rem;
  box-shadow: 0 8px 16px rgba(0,0,0,.25);
  display: inline-block;
  transform: rotate(4deg);
  position: relative;
}
.polaroid::before {
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%) rotate(4deg);
  width: 60px; height: 24px;
  background: rgba(255,215,106,.85);
  border: 1px solid rgba(0,0,0,.05);
}
.polaroid img { width: 130px; height: auto; display: block; }
.polaroid figcaption {
  font-family: "Caveat", cursive;
  font-size: 1.2rem;
  text-align: center;
  margin-top: .3rem;
  color: #3d2f1f;
}

/* Galleri-miniatyrer (annons.php) — klickbara bildväljare, ingen bildtext */
.gallery-thumb {
  background: #fffdf3;
  padding: .5rem .5rem 1.1rem;
  box-shadow: 0 6px 12px rgba(0,0,0,.22);
  cursor: pointer;
  border: 2px solid transparent;
}
.gallery-thumb.active { border-color: #c0392b; }
.gallery-thumb img { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; display: block; }

.main-photo {
  background: #fffdf3;
  padding: .75rem .75rem 1.75rem;
  box-shadow: 0 10px 22px rgba(0,0,0,.28);
  display: inline-block;
  max-width: 100%;
}
.main-photo img { max-width: 100%; max-height: 360px; display: block; margin: 0 auto; }

/* Kartan (index.php) */
.cork-frame {
  background: #c9a563;
  border: 10px solid #6b4a2b;
  border-radius: .5rem;
  padding: 1.25rem;
  box-shadow: inset 0 0 30px rgba(0,0,0,.25);
}
.kommun-map-wrap-cork { max-width: 360px; margin: 0 auto; }
.kommun-map-svg { width: 100%; height: auto; display: block; }
.kommun-shape { fill: #e9d9b5 !important; stroke: #6b4a2b; stroke-width: 1.5; cursor: pointer; transition: fill .15s ease-in-out; }
.kommun-shape:hover,
.kommun-shape.is-hover-linked { fill: #f3c76b !important; }
.kommun-shape.has-ads { fill: #c0392b !important; }
.kommun-shape.has-ads:hover,
.kommun-shape.has-ads.is-hover-linked { fill: #9c2c1f !important; }

/* Lägg upp-flödet — ugglan och hjälptexten delar samma lapp/ruta */
.owl-in-note .owl-svg { width: 70px; height: auto; display: block; }
#owlHelperBubble { transition: opacity .2s ease-in-out; }
.owl-note-title { font-family: "Caveat", cursive; font-size: 1.5rem; font-weight: 700; display: block; margin: 0 0 .2rem; }
.owl-note-text { font-size: .9rem; }

#dropZone {
  background: #fffdf3;
  box-shadow: 0 6px 14px rgba(0,0,0,.2);
  border: 2px dashed #c9a563;
  border-radius: .25rem;
  cursor: pointer;
  transition: border-color .15s ease-in-out, background-color .15s ease-in-out;
}
#dropZone.dragover { border-color: #c0392b; background-color: #fff3d6; }

.preview-thumb {
  position: relative;
  width: 84px; height: 84px;
  background: #fffdf3;
  padding: .3rem .3rem .8rem;
  box-shadow: 0 4px 8px rgba(0,0,0,.2);
}
.preview-thumb img { width: 100%; height: 56px; object-fit: cover; display: block; }
.preview-thumb-remove {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; line-height: 1;
  border: none; border-radius: 50%;
  background: #c0392b; color: #fff; font-size: .7rem; cursor: pointer;
}

label.form-label { font-weight: 700; font-size: .85rem; }
.form-control, .form-select {
  border: 1px solid #e8cf9c;
  background: #fffaf0;
  border-radius: .25rem;
}
.form-control:focus, .form-select:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 .2rem rgba(192,57,43,.15);
}

/* Admin */
.admin-table-wrap { background: #fffdf3; box-shadow: 0 6px 14px rgba(0,0,0,.2); padding: 1rem; }
.thumb { width: 60px; height: 60px; object-fit: cover; border-radius: .25rem; }
