/* Sajtfabriken Gym Directory */
#sf-gyms-root {
  --brand: #1e3a8a;
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #0f1b2d;
  --muted: rgba(15,27,45,.55);
  --line: rgba(0,0,0,.08);
  --soft: #f8f9fb;
  color: var(--ink);
  background: var(--bg);
  padding: 40px 20px;
  border-radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
#sf-gyms-root *, #sf-gyms-root *::before, #sf-gyms-root *::after { box-sizing: border-box; }
#sf-gyms-root svg { display: inline-block; vertical-align: middle; width: 16px; height: 16px; flex-shrink: 0; }
.sfg-wrap { max-width: 1100px; margin: 0 auto; }
.sfg-header { display:flex; flex-direction:column; align-items:center; text-align:center; margin-bottom: 16px; }
.sfg-header img { height: 160px; width:auto; margin-bottom: -8px; }
.sfg-header p { color: var(--muted); font-size: 14px; margin: 0; }

.sfg-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15,27,45,.04), 0 8px 24px rgba(15,27,45,.06);
  margin-bottom: 32px;
}
.sfg-grid { display:grid; gap:16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sfg-grid { grid-template-columns: 1fr 1fr; } }
.sfg-field label { display:block; font-size:12px; font-weight:500; color: var(--muted); margin-bottom: 6px; }
.sfg-field input, .sfg-field textarea {
  width:100%;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: box-shadow .15s, background .15s, border-color .15s;
  font-family: inherit;
}
.sfg-field input:focus, .sfg-field textarea:focus {
  background:#fff;
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(30,58,138,.2);
}
.sfg-field textarea { resize: vertical; min-height: 80px; }
.sfg-btn {
  display:inline-flex; align-items:center; gap:8px;
  background: var(--brand); color:#fff; border:0;
  border-radius: 10px; padding: 11px 20px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  box-shadow: 0 6px 20px rgba(30,58,138,.35);
  transition: background-color .25s ease, box-shadow .25s ease, transform .1s ease;
  margin-top: 20px;
}
.sfg-btn:hover { background: #3b5bc9; box-shadow: 0 8px 24px rgba(59,91,201,.45); }
.sfg-btn:active { transform: scale(.98); }
.sfg-btn.ghost { background:#fff; color:var(--ink); border:1px solid var(--line); box-shadow:none; }
.sfg-btn.ghost:hover { background:#f2f4f8; box-shadow:none; }

.sfg-cards { display:grid; gap:16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sfg-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .sfg-cards { grid-template-columns: repeat(3, 1fr); } }
.sfg-empty {
  grid-column: 1 / -1;
  border:1px dashed var(--line);
  background: rgba(255,255,255,.6);
  border-radius: 14px;
  text-align:center;
  padding: 40px;
  color: rgba(15,27,45,.4);
  font-size: 14px;
}

.sfg-card {
  position:relative;
  background: var(--card);
  border:1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  cursor:pointer;
  box-shadow: 0 1px 2px rgba(15,27,45,.04), 0 4px 12px rgba(15,27,45,.04);
  transition: transform .3s, box-shadow .3s;
  overflow:hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s, opacity .3s;
}
.sfg-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(15,27,45,.10); }
@keyframes sfg-card-in {
  from { opacity:0; transform: translateY(12px) scale(.96); }
  to   { opacity:1; transform: none; }
}
.sfg-card.sfg-in { animation: sfg-card-in .35s cubic-bezier(.2,.7,.2,1) both; }
.sfg-card.sfg-out {
  animation: sfg-card-out .3s cubic-bezier(.4,0,.6,1) forwards;
  pointer-events:none;
}
@keyframes sfg-card-out {
  to { opacity:0; transform: scale(.9) translateY(-6px); filter: blur(2px); }
}

.sfg-card::before {
  content:""; position:absolute; top:-40px; right:-40px; width:96px; height:96px;
  background: rgba(30,58,138,.13); border-radius:9999px; filter: blur(28px);
  opacity:0; transition: opacity .5s;
}
.sfg-card:hover::before { opacity: 1; }
.sfg-card h3 { margin:0; font-size: 18px; font-weight:600; padding-right: 40px; }
.sfg-card .owner { margin-top:4px; font-size: 12px; color: rgba(15,27,45,.5); }
.sfg-card .time { margin-top: 12px; font-size: 11px; color: rgba(15,27,45,.45); display:flex; align-items:center; gap:6px; }
.sfg-card .time svg { width: 12px; height: 12px; flex-shrink: 0; }
.sfg-card .icons { margin-top: 12px; display:flex; gap:8px; color: rgba(15,27,45,.4); }
.sfg-card .icons svg { width: 14px; height:14px; flex-shrink: 0; }
.sfg-del {
  position:absolute; top: 12px; right: 12px;
  width: 32px; height:32px; border-radius:10px; border:0;
  background: transparent; color: rgba(15,27,45,.35);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; opacity: 0;
  transition: opacity .3s ease, background-color .3s ease, color .3s ease;
}
.sfg-card:hover .sfg-del { opacity: 1; }
.sfg-del:hover { background: rgba(239,68,68,.12); color: #ef4444; }
.sfg-del svg { width:16px; height:16px; }

/* Modal */
.sfg-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15,27,45,.4);
  backdrop-filter: blur(4px);
  display:flex; align-items:center; justify-content:center;
  padding: 16px;
  animation: sfg-fade .2s ease;
}
@keyframes sfg-fade { from { opacity:0 } to { opacity:1 } }
@keyframes sfg-pop { from { opacity:0; transform: translateY(12px) scale(.96) } to { opacity:1; transform:none } }
.sfg-modal .box {
  background:#fff; border-radius: 18px; padding: 32px;
  max-width: 520px; width:100%; position:relative;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  animation: sfg-pop .25s ease;
  max-height: 90vh; overflow-y: auto;
}
.sfg-close {
  position:absolute; top: 14px; right: 14px;
  width:34px; height:34px; border-radius:10px; border:0; background:transparent;
  color: rgba(15,27,45,.6); cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
.sfg-close:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.sfg-close svg { width:16px; height:16px; }
.sfg-modal h2 { margin:0; font-size: 22px; font-weight:600; padding-right: 40px; }
.sfg-modal .added { margin-top:6px; font-size:12px; color: rgba(15,27,45,.5); display:flex; align-items:center; gap:6px; }
.sfg-rows { margin-top: 24px; display:flex; flex-direction:column; gap:12px; }
.sfg-row {
  background: var(--soft); border:1px solid var(--line);
  border-radius: 10px; padding: 12px; display:flex; gap: 12px;
  font-size:14px;
}
.sfg-row .lbl { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color: rgba(15,27,45,.4); }
.sfg-row .val { margin-top:2px; color: rgba(15,27,45,.9); word-break: break-word; }
.sfg-row a { color: var(--brand); text-decoration:none; }
.sfg-row a:hover { text-decoration: underline; }
.sfg-row svg { width: 16px; height:16px; color: rgba(15,27,45,.5); flex-shrink:0; margin-top:2px; }
.sfg-info {
  background: var(--soft); border:1px solid var(--line);
  border-radius: 10px; padding: 14px; font-size:14px; color: rgba(15,27,45,.85);
  white-space: pre-wrap;
}
.sfg-actions { margin-top: 24px; display:flex; justify-content:flex-end; gap: 8px; }
