/* ============================================================
   style.css – Pomysły dla Kostuchny
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:      #1D9E75;
  --green-dk:   #0F6E56;
  --green-lt:   #E1F5EE;
  --green-bd:   #9FE1CB;
  --red:        #A32D2D;
  --red-lt:     #FCEBEB;
  --red-bd:     #F7C1C1;
  --amber-lt:   #FAEEDA;
  --amber-text: #634006;
  --text:       #1a1a1a;
  --text-2:     #5a5a6a;
  --text-3:     #9a97a8;
  --bg:         #f7f4ee;
  --surface:    #ffffff;
  --border:     rgba(0,0,0,0.10);
  --border-2:   rgba(0,0,0,0.18);
  --radius:     8px;
  --radius-lg:  12px;
  font-size: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Nav ---------------------------------------------------- */
.site-nav {
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 1;
  min-width: 0;
}
.logo .ti { font-size: 18px; color: var(--green); flex-shrink: 0; margin-top: 2px; }
.logo-name { font-family: 'Lora', serif; font-size: 17px; font-weight: 500; display: block; line-height: 1.2; color: var(--text); }
.logo-sub  { font-size: 10px; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
}
.nav-btn {
  padding: 5px 12px;
  border: 0.5px solid transparent;
  border-radius: var(--radius);
  background: none;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-btn:hover { background: rgba(0,0,0,.04); color: var(--text); text-decoration: none; }
.nav-all-districts { color: var(--text-3); gap: 4px; }
.nav-all-districts:hover { color: var(--green) !important; }
.nav-all-districts .ti { font-size: 15px; }
@media (max-width: 700px) { .nav-all-districts-label { display: none; } }
.nav-active    { color: var(--text); font-weight: 500; }
.nav-cta       { border-color: var(--green); color: var(--green); font-weight: 500; }
.nav-cta:hover { background: var(--green); color: white; text-decoration: none; }
.nav-muted     { color: var(--text-3); }

/* --- Notifications ----------------------------------------- */
.notif {
  padding: 10px 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.notif-ok  { background: var(--green-lt); color: #085041; border-bottom: 0.5px solid var(--green-bd); }
.notif-err { background: var(--red-lt); color: var(--red); border-bottom: 0.5px solid var(--red-bd); }
.notif .ti { font-size: 15px; }
.notif-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 15px;
  opacity: .6;
  padding: 0 4px;
}
.notif-close:hover { opacity: 1; }

/* --- Hero --------------------------------------------------- */
.hero {
  background: rgba(255,255,255,.6);
  border-bottom: 0.5px solid var(--border);
  padding: 48px 20px 40px;
  text-align: center;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--surface);
  border: 0.5px solid var(--border-2);
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 14px;
  letter-spacing: .05em;
}
.badge-pill .ti { font-size: 12px; color: var(--green); }
.hero-title {
  font-family: 'Lora', serif;
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -.02em;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}
.hero-title em { font-style: italic; color: var(--green); }
@media (max-width: 540px) {
  .hero-title em { display: block; }
}
.hero-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0 22px;
}
.hero-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.hero-step .ti { font-size: 18px; color: var(--green); }
.hero-step-arrow { font-size: 14px; color: var(--border-2); transition: transform .2s; }
.hero-sub {
  font-size: 15px;
  color: var(--text-2);
  max-width: 500px;
  margin: 0 auto 22px;
  line-height: 1.65;
}

/* --- Page layout ------------------------------------------- */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  flex: 1;
}

/* --- Buttons ----------------------------------------------- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn-cta:hover { background: var(--green-dk); transform: translateY(-1px); text-decoration: none; color: white; }

.btn-primary {
  display: block;
  width: 100%;
  padding: 10px 20px;
  background: var(--text);
  color: var(--surface);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: opacity .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-primary:hover { opacity: .8; text-decoration: none; color: var(--surface); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: none;
  border: 0.5px solid var(--border-2);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.btn-outline:hover { border-color: var(--text); color: var(--text); text-decoration: none; }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: none;
  border: 0.5px solid var(--red-bd);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 12px;
  color: var(--red);
  cursor: pointer;
  transition: background .15s;
}
.btn-danger:hover { background: var(--red-lt); }

.btn-back { margin-bottom: 20px; font-size: 12px; }

/* --- Tabs --------------------------------------------------- */
.tab-row {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  padding: 4px;
  background: rgba(0,0,0,.04);
  border-radius: var(--radius);
  width: fit-content;
  max-width: 100%;
  margin-bottom: 18px;
}
.tab {
  padding: 5px 13px;
  border: none;
  border-radius: 6px;
  background: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.tab:hover:not(.tab-on)  { background: var(--surface); color: var(--text); }
.tab.tab-on { background: var(--surface); color: var(--text); box-shadow: 0 0 0 0.5px var(--border-2); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Idea cards -------------------------------------------- */
.section { margin-bottom: 40px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
  flex-wrap: wrap;
}
.section-title { font-family: 'Lora', serif; font-size: 22px; font-weight: 500; }
.section-count { font-size: 13px; color: var(--text-3); }

.ideas-list { display: flex; flex-direction: column; gap: 8px; }

.idea-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: border-color .15s;
}
.idea-card:hover { border-color: var(--border-2); }

.rank-num {
  font-family: 'Lora', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--border-2);
  min-width: 24px;
  text-align: right;
  flex-shrink: 0;
  padding-top: 3px;
  line-height: 1;
}

.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 0.5px solid var(--border-2);
  border-radius: var(--radius);
  padding: 5px 9px;
  background: none;
  cursor: pointer;
  min-width: 44px;
  flex-shrink: 0;
  font-family: inherit;
  transition: all .15s;
}
.vote-btn .ti { font-size: 14px; }
.vote-btn:hover:not(:disabled):not(.voted) { border-color: var(--green); color: var(--green); background: var(--green-lt); }
.vote-btn.voted { border-color: var(--green); color: var(--green); background: var(--green-lt); }
.vote-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Like button — komentarze */
.like-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0.5px solid var(--border-2);
  border-radius: 999px; padding: 4px 12px;
  font-size: 12px; color: var(--text-3); cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.like-btn:hover:not(:disabled):not(.liked) { border-color: #e05c7a; color: #e05c7a; background: #fdf0f3; }
.like-btn.liked { border-color: #e05c7a; color: #e05c7a; background: #fdf0f3; }
.like-btn:disabled { opacity: .45; cursor: not-allowed; }
.like-btn .ti { font-size: 13px; }
.like-btn .like-icon-filled { display: none; }
.like-btn.liked .like-icon-outline { display: none; }
.like-btn.liked .like-icon-filled { display: inline-block; line-height: 1; vertical-align: middle; }
.vote-count { font-size: 14px; font-weight: 500; }

.idea-body  { flex: 1; min-width: 0; }
.idea-title { font-size: 15px; font-weight: 500; color: var(--text); line-height: 1.4; margin-bottom: 3px; }
.idea-desc  { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.idea-meta  { font-size: 12px; color: var(--text-3); margin-top: 5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.login-link { font-size: 12px; color: var(--green); text-decoration: underline; text-underline-offset: 2px; }

/* --- Empty state ------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-3);
  font-size: 14px;
  border: 0.5px dashed var(--border-2);
  border-radius: var(--radius-lg);
}
.empty-state .ti { font-size: 24px; display: block; margin-bottom: 8px; opacity: .4; }
.empty-state p { margin-bottom: 8px; }

/* --- CTA box ----------------------------------------------- */
.cta-box {
  background: rgba(255,255,255,.7);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.cta-box > .ti { font-size: 24px; color: var(--green); display: block; margin-bottom: 10px; }
.cta-box-title { font-weight: 500; margin-bottom: 6px; }
.cta-box-sub { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.cta-box-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* --- Forms ------------------------------------------------- */
.form-wrap {
  max-width: 440px;
  margin: 32px auto;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.form-wrap-wide { max-width: 560px; }

.form-title { font-family: 'Lora', serif; font-size: 26px; font-weight: 500; margin-bottom: 5px; letter-spacing: -.02em; }
.form-sub   { font-size: 14px; color: var(--text-2); margin-bottom: 24px; line-height: 1.55; }

.form-group  { margin-bottom: 16px; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label  { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.char-count  { font-weight: 400; color: var(--text-3); float: right; font-size: 12px; }

.inp {
  width: 100%;
  padding: 8px 11px;
  border: 0.5px solid var(--border-2);
  border-radius: var(--radius);
  background: rgba(0,0,0,.02);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  display: block;
}
.inp:focus  { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,158,117,.1); }
.inp-textarea { resize: vertical; }

.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.form-error {
  background: var(--red-lt);
  border: 0.5px solid var(--red-bd);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.form-error ul { list-style: none; padding: 0; margin: 0; }
.form-error ul li::before { content: '· '; }
.form-error .ti { flex-shrink: 0; font-size: 15px; margin-top: 1px; }

.consent-box {
  background: rgba(0,0,0,.025);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}
.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  cursor: pointer;
}
.consent-row input[type=checkbox] { width: 14px; height: 14px; margin-top: 2px; flex-shrink: 0; accent-color: var(--green); cursor: pointer; }
.consent-note  { font-size: 10px; color: var(--text-3); margin-top: 8px; }
.required-mark { color: var(--red); margin-left: 2px; }
.form-footer   { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text-2); }

/* --- Panel ------------------------------------------------- */
.panel-header { margin-bottom: 24px; }
.panel-title  { font-family: 'Lora', serif; font-size: 28px; font-weight: 500; margin-bottom: 5px; }
.panel-email  { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.panel-email .ti { font-size: 13px; }
.panel-since  { color: var(--text-3); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat-card  { background: rgba(0,0,0,.025); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-val   { font-family: 'Lora', serif; font-size: 30px; font-weight: 500; }
.stat-label { font-size: 11px; color: var(--text-3); margin-top: 3px; }

.panel-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 7px; }
.panel-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.panel-locked-note { font-size: 11px; color: var(--text-3); margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.panel-locked-note .ti { font-size: 11px; }

.votes-badge    { font-size: 13px; font-weight: 500; color: var(--text-3); display: inline-flex; align-items: center; gap: 3px; }
.votes-badge-on { color: #085041; }
.votes-badge .ti { font-size: 11px; }

.status-badge  { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 500; }
.status-active { background: var(--green-lt); color: #085041; }
.status-new    { background: var(--amber-lt); color: var(--amber-text); }

.edit-form .form-group { margin-bottom: 10px; }

/* --- Regulamin --------------------------------------------- */
.regulamin-wrap { max-width: 680px; margin: 0 auto; }
.regulamin-title { font-family: 'Lora', serif; font-size: 30px; font-weight: 500; margin-bottom: 4px; letter-spacing: -.02em; }
.regulamin-meta  { font-size: 12px; color: var(--text-3); margin-bottom: 28px; padding-bottom: 20px; border-bottom: 0.5px solid var(--border); }
.regulamin-meta a { color: var(--text-3); }

.regulamin-section { margin-bottom: 28px; }
.regulamin-section h2 { font-family: 'Lora', serif; font-size: 18px; font-weight: 500; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 0.5px solid var(--border); }
.regulamin-section p  { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 8px; }
.regulamin-section ol { padding-left: 18px; margin: 0; }
.regulamin-section ol li { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 6px; padding-left: 4px; }
.regulamin-section ul { list-style: none; padding: 0; margin: 8px 0 4px 0; }
.regulamin-section ul li { font-size: 14px; color: var(--text-2); line-height: 1.7; padding-left: 14px; position: relative; margin-bottom: 4px; }
.regulamin-section ul li::before { content: '–'; position: absolute; left: 0; color: var(--text-3); }
.regulamin-section strong { font-weight: 500; color: var(--text); }
.regulamin-section a { color: var(--green); }

/* --- Footer ------------------------------------------------ */
.site-footer { border-top: 0.5px solid var(--border); margin-top: auto; }

/* --- Big footer top ---------------------------------------- */
.footer-top {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  padding: 36px 20px 28px;
}
.footer-logo { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.footer-logo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.footer-logo-name { font-size: 14px; font-weight: 500; color: var(--text); }
.footer-desc { font-size: 12px; color: var(--text-3); line-height: 1.65; margin-bottom: 10px; }
.footer-email { font-size: 12px; color: var(--green); font-weight: 500; text-decoration: none; }
.footer-email:hover { text-decoration: underline; }
.footer-col-title {
  font-size: 10px; font-weight: 500; color: var(--text-3);
  letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px;
}
.footer-link { display: block; font-size: 12px; color: var(--text-2); text-decoration: none; margin-bottom: 5px; }
.footer-link:hover { color: var(--green); }
.footer-link-green { color: var(--green) !important; font-weight: 500; }

/* --- Districts grid ---------------------------------------- */
.footer-districts {
  border-top: 0.5px solid var(--border);
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 0;
}
.footer-districts-title {
  font-size: 10px; font-weight: 500; color: var(--text-3);
  letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px;
}
.footer-districts-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin-bottom: 20px;
}
.footer-district-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 7px; border-radius: 5px;
  text-decoration: none;
  transition: background .12s;
}
.footer-district-chip:hover { background: var(--bg-2); }
.footer-district-chip.current { background: var(--bg-2); border: 0.5px solid var(--border); }
.footer-district-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.footer-district-name { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.footer-district-chip.current .footer-district-name { color: var(--green); font-weight: 500; }
@media (max-width: 480px) {
  .footer-districts-grid { grid-template-columns: 1fr !important; }
  .footer-district-name { font-size: 13px; white-space: normal; overflow: visible; text-overflow: unset; }
}

/* --- Bottom bar -------------------------------------------- */
.footer-bottom {
  border-top: 0.5px solid var(--border);
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-copy { font-size: 11px; color: var(--text-3); }
.footer-bottom-links { display: flex; gap: 16px; align-items: center; }
.footer-bottom-links a { font-size: 11px; color: var(--text-3); text-decoration: none; }
.footer-bottom-links a:hover { color: var(--text); }
.footer-bottom-links span { font-size: 11px; }

/* --- Footer responsive ------------------------------------- */
@media (max-width: 700px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-districts-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-districts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}
.footer-sep { opacity: .4; }
.footer-inner a { color: var(--text-3); text-decoration: none; }
.footer-inner a:hover { color: var(--text); }
@media (max-width: 480px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer-sep { display: none; }
  .hero-steps { gap: 8px; }
}

.desc-toggle {
  display: inline-block;
  margin-top: 4px;
  background: none;
  border: none;
  color: var(--green);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.desc-toggle:hover { color: var(--green-dk); }

.lnk-btn {
  background: none;
  border: none;
  color: var(--green);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lnk-btn:hover { color: var(--green-dk); }
.logo-prefix { white-space: nowrap; }
.logo-district { white-space: nowrap; }
@media (max-width: 600px) {
  .nav-inner { padding: 8px 14px; }
  .hero { padding: 32px 14px 28px; }
  .page-content { padding: 20px 14px 40px; }
  .form-row { grid-template-columns: 1fr; }
  .tab { font-size: 11px; padding: 4px 9px; }
  .logo-name { font-size: 14px; white-space: normal; }
  .logo-district { display: block; }
  .logo { flex-shrink: 1; min-width: 0; }
}

/* --- Cookie popup ------------------------------------------ */
#cookie-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  width: calc(100% - 32px);
  max-width: 780px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  border: 0.5px solid var(--border-2);
  animation: popupIn .3s ease;
}
@keyframes popupIn {
  from { opacity:0; transform: translateX(-50%) translateY(16px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}
.cookie-inner {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 200px; font-size: 13px; line-height: 1.55; }
.cookie-text strong { display: block; margin-bottom: 5px; font-size: 14px; color: var(--text); }
.cookie-text p { color: var(--text-2); margin: 0; }
.cookie-text a { color: var(--green); text-decoration: underline; }
.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-btn-accept {
  padding: 9px 22px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.cookie-btn-accept:hover { background: #0F6E56; }
.cookie-btn-more {
  font-size: 12px;
  color: var(--text-3);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.cookie-btn-more:hover { color: var(--text-2); }
@media (max-width: 600px) {
  #cookie-popup { bottom: 10px; width: calc(100% - 20px); }
  .cookie-inner { padding: 14px 16px; }
  .cookie-actions { width: 100%; justify-content: space-between; }
}
.status-pending  { background: #FFF3CD; color: #856404; }
.status-rejected { background: #FCEBEB; color: #A32D2D; }

/* --- Vote column + comment bubble -------------------------- */
.vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.comment-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 0.5px solid var(--border-2);
  border-radius: var(--radius);
  padding: 5px 9px;
  min-width: 44px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  text-decoration: none;
  transition: all .15s;
}
.comment-bubble .ti { font-size: 13px; }
.comment-bubble:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-lt);
  text-decoration: none;
}

/* --- Idea title link ---------------------------------------- */
.idea-title-link {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}
.idea-title-link:hover { color: var(--green); text-decoration: none; }

/* --- FB share button --------------------------------------- */
.fb-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: #1877F2;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 5px;
  transition: background .15s;
}
.fb-share-btn .ti { font-size: 14px; }
.fb-share-btn:hover { background: #e7f0fd; text-decoration: none; }

/* --- Image upload ------------------------------------------ */
.image-upload-area {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}
.image-previews { display: contents; }
.image-preview-item { display: flex; flex-direction: column; }
.img-preview-wrap { position: relative; width: 100%; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--bg); }
.img-preview-wrap img { width: 100%; height: 100%; object-fit: cover; }
.img-main-badge { position: absolute; bottom: 5px; left: 5px; font-size: 10px; font-weight: 600; background: var(--green); color: #fff; padding: 2px 7px; border-radius: 4px; }
.img-remove-btn { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.image-add-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 4/3; border: 1.5px dashed var(--border-2); border-radius: 8px; cursor: pointer; font-size: 12px; color: var(--text-3); transition: all .15s; }
.image-add-btn:hover { border-color: var(--green); color: var(--green); }
.image-add-btn .ti { font-size: 24px; }

/* Existing images (edit form) */
.existing-image-item { display: flex; flex-direction: column; width: 110px; }
.existing-image-item img { width: 110px; height: 80px; object-fit: cover; border-radius: 6px; }

/* --- Lightbox ---------------------------------------------- */
.idea-gallery { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.idea-gallery-thumb { position: relative; width: 120px; height: 85px; border-radius: 8px; overflow: hidden; cursor: pointer; flex-shrink: 0; }
.idea-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.idea-gallery-thumb:hover img { transform: scale(1.05); }
.idea-gallery-thumb:first-child { width: 100%; height: 220px; }
.gallery-more-badge { position: absolute; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 600; }

#lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 9999; align-items: center; justify-content: center; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 8px; object-fit: contain; }
#lightbox-close { position: absolute; top: 16px; right: 20px; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; }
#lightbox-prev, #lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 32px; cursor: pointer; padding: 10px; }
#lightbox-prev { left: 10px; }
#lightbox-next { right: 10px; }
#lightbox-caption { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font-size: 13px; text-align: center; max-width: 80%; }

/* Card thumbnail */
.card-thumb { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; display: block; }
.card-more-photos { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.card-more-photos .ti { font-size: 11px; }

/* Card with thumbnail - right side on desktop */
.idea-body { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; }
.idea-body-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.idea-body-thumb { flex: 0 0 33%; max-width: 33%; border-radius: 8px; overflow: hidden; align-self: stretch; }
.idea-body-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 80px; border-radius: 8px; }
@media (max-width: 600px) {
  .idea-body { flex-direction: column-reverse; }
  .idea-body-thumb { flex: none; max-width: 100%; width: 100%; align-self: auto; }
  .idea-body-thumb img { height: auto; aspect-ratio: 16/9; min-height: unset; }
}

/* --- Thumb image count badge ------------------------------- */
.idea-body-thumb { position: relative; }
.thumb-count-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}
.thumb-count-badge .ti { font-size: 11px; }
.no-photo-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  text-align: center;
  background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 4px 0;
  border-radius: 4px;
  pointer-events: none;
}
