/** JakToMám — Result Symbols CSS. Extracted from result_symbols.php. */

/* ── Layout ──────────────────────────────────────────────────── */
.sym-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}
.sym-back {
  font-size: .82rem; color: var(--color-text-3, #6b7280); padding: .6rem 0 .1rem;
  display: block; text-decoration: none; text-align: right;
}
.sym-back:hover { color: var(--color-text-2, #374151); }

/* ── Header ──────────────────────────────────────────────────── */
.sym-header {
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  padding-bottom: 1.1rem;
  margin-bottom: 1.5rem;
}
.sym-header-eyebrow {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: .35rem;
  font-size: 1rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--color-text-3, #6b7280); margin-bottom: .55rem;
}
.sym-done { font-size: .8rem; font-weight: 600; color: var(--color-text-4, #9ca3af); letter-spacing: .03em; text-transform: none; }
.sym-question {
  font-size: .9rem; color: var(--color-text-2, #4b5563); line-height: 1.6;
  background: #f8f9ff; border-left: 3px solid #c7d2fe;
  padding: .5rem .8rem; border-radius: 0;
  margin-bottom: .7rem; white-space: pre-wrap; word-break: break-word;
}
.sym-header h1 {
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  font-weight: 700; color: var(--color-text, #111827); margin: 0;
}

/* ── Card (details/summary) ──────────────────────────────────── */
.sym-card {
  background: var(--color-surface, #fff);
  border-radius: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.05);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.sym-card > summary {
  display: flex; align-items: center; gap: .55rem;
  padding: 1.1rem 1.5rem;
  cursor: pointer; list-style: none;
  user-select: none;
}
.sym-card > summary::-webkit-details-marker { display: none; }
.sym-card > summary::marker { display: none; }
.sym-card-icon { font-size: 1.15rem; }
.sym-card-title { font-size: 1.05rem; font-weight: 700; color: var(--color-text, #111827); flex: 1; }
.sym-card-toggle { font-size: .75rem; color: var(--color-text-4, #9ca3af); }
details.sym-card[open] > summary { border-bottom: 1px solid #f1f5f9; }
details.sym-card[open] .sym-card-toggle::before { content: '▴'; }
details.sym-card:not([open]) .sym-card-toggle::before { content: '▾'; }
.sym-card-body { padding: 1.1rem 1.5rem 1.4rem; }

/* ── Canvas ──────────────────────────────────────────────────── */
.canvas-wrap {
  position: relative; background: var(--color-bg-scene, #0d0d1a);
  border-radius: 0; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
}
#symCanvas { display: block; width: 100%; cursor: crosshair; }
#symTooltip {
  position: absolute; pointer-events: none;
  background: rgba(0,0,0,.85); color: #fff;
  font-size: .78rem; padding: .35rem .7rem;
  border-radius: 0; line-height: 1.5;
  opacity: 0; transition: opacity .15s;
  max-width: 180px; text-align: center;
  border: 1px solid rgba(255,255,255,.12);
}
.legend-row { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: .8rem; font-size: .78rem; color: #888; align-items: center; }
.leg-item { display: flex; align-items: center; gap: .35rem; }
.leg-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Žebříček ────────────────────────────────────────────────── */
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.sym-item-card {
  background: #f9fafb; border-radius: 0; padding: .85rem 1rem;
  display: flex; align-items: center; gap: .85rem;
  border: 1px solid #f1f5f9;
}
.sym-img-wrap { flex-shrink: 0; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.sym-img-wrap img { width: 48px; height: 48px; object-fit: contain; }
.sym-body { flex: 1; min-width: 0; }
.sym-label { font-size: .95rem; font-weight: 700; color: var(--color-nav, #1a1a2e); margin-bottom: .3rem; }
.sym-bar-wrap { height: 7px; background: var(--color-border, #e5e7eb); border-radius: 0; overflow: hidden; margin-bottom: .3rem; }
.sym-bar { height: 100%; border-radius: 0; }
.sym-meta { display: flex; justify-content: space-between; align-items: center; }
.sym-count { font-size: .78rem; color: var(--color-text-4, #9ca3af); }
.val-tag { font-size: .7rem; font-weight: 700; letter-spacing: .03em; padding: .1rem .45rem; border-radius: 0; }
.val-pos  { background: var(--color-success-bg, #d1fae5); color: #065f46; }
.val-neg  { background: var(--color-error-bg, #fee2e2); color: #991b1b; }
.val-neut { background: #f3f4f6; color: var(--color-text-3, #6b7280); }
.sym-rank { font-size: .72rem; font-weight: 700; color: #c4b5fd; min-width: 1.2rem; }

/* ── Valence ─────────────────────────────────────────────────── */
.val-legend {
  display: flex; justify-content: space-between;
  font-size: .72rem; color: var(--color-text-4, #9ca3af); font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: .6rem; padding: 0 0 .4rem; border-bottom: 1px solid #f0f0f0;
}
.val-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
.sym-icon { flex: 0 0 36px; text-align: center; }
.sym-icon img { width: 32px; height: 32px; object-fit: contain; }
.sym-name { flex: 0 0 90px; font-size: .82rem; font-weight: 600; color: var(--color-text-2, #374151); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars-center { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; }
.bar-neg-wrap { flex: 1; display: flex; justify-content: flex-end; }
.bar-pos-wrap { flex: 1; display: flex; justify-content: flex-start; }
.bar-neg { height: 20px; background: var(--color-negative, #fca5a5); border-radius: 0; min-width: 2px; }
.bar-pos { height: 20px; background: #6ee7b7; border-radius: 0; min-width: 2px; }
.center-line { width: 2px; height: 28px; background: var(--color-border, #e5e7eb); flex-shrink: 0; }
.bar-zero { width: 4px; height: 20px; background: var(--color-border, #e5e7eb); border-radius: 0; }
.val-num { flex: 0 0 40px; font-size: .78rem; font-weight: 700; text-align: left; }
.val-pos-num { color: var(--color-success, #059669); }
.val-neg-num { color: #dc2626; }
.val-zero-num { color: var(--color-text-4, #9ca3af); }

/* ── Ambivalence ─────────────────────────────────────────────── */
.intro-box {
  background: #fdf4ff; border: 1px solid #e9d5ff; border-radius: 0;
  padding: .9rem 1.1rem; margin: 0 0 1rem; font-size: .87rem; line-height: 1.65; color: #6b21a8;
}
.intro-box strong { color: #4c1d95; }
.ambiv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.ambiv-card {
  background: var(--color-surface, #fff); border-radius: 0; padding: 1.1rem .9rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08); text-align: center;
  border-top: 3px solid #c084fc;
}
.ambiv-card img { width: 48px; height: 48px; object-fit: contain; margin-bottom: .45rem; }
.ambiv-card-label { font-size: .9rem; font-weight: 700; color: var(--color-nav, #1a1a2e); margin-bottom: .4rem; }
.ambiv-badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .04em; background: #f3e8ff; color: var(--color-shadow, #7c3aed); padding: .15rem .55rem; border-radius: 0; margin-bottom: .5rem; }
.ambiv-counts { display: flex; justify-content: center; gap: .4rem; font-size: .78rem; }
.cnt-pos { color: var(--color-success, #059669); font-weight: 700; }
.cnt-neg { color: #dc2626; font-weight: 700; }
.cnt-label { color: var(--color-text-4, #9ca3af); }
.empty-box { background: #f9fafb; border-radius: 0; padding: 2rem 1.5rem; text-align: center; color: var(--color-text-4, #9ca3af); font-size: .9rem; }

/* ── Oblasti ─────────────────────────────────────────────────── */
.areas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.area-card { border-radius: 0; padding: 1rem 1.1rem; border: 2px solid; }
.area-title { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-3, #6b7280); margin-bottom: .45rem; }
.area-concepts { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .8rem; }
.concept-tag { font-size: .77rem; font-weight: 600; background: rgba(0,0,0,.07); padding: .1rem .4rem; border-radius: 0; color: var(--color-text-2, #374151); }
.area-symbols { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.sym-item { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.sym-item img { width: 40px; height: 40px; object-fit: contain; }
.sym-item-label { font-size: .66rem; color: var(--color-text-3, #6b7280); text-align: center; white-space: nowrap; max-width: 50px; overflow: hidden; text-overflow: ellipsis; }
.sym-item-cnt { font-size: .63rem; font-weight: 700; color: var(--color-text-4, #9ca3af); }
.no-symbols { font-size: .78rem; color: var(--color-text-4, #9ca3af); font-style: italic; }

/* ── Pořadí symbolů ──────────────────────────────────────────── */
.rank-result-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .3rem 0; border-bottom: 1px solid #f4f4f4;
  font-size: .88rem;
}
.rank-result-row:last-child { border-bottom: none; }
.rr-pos   { width: 1.6em; text-align: right; color: #bbb; font-weight: 600; flex-shrink: 0; }
.rr-img   { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; background: var(--color-nav, #1a1a2e); border-radius: 0; padding: 2px; }
.sym-icon img { background: var(--color-nav, #1a1a2e); border-radius: 0; padding: 2px; }
.ambiv-card img { background: var(--color-nav, #1a1a2e); border-radius: 0; padding: 4px; }
.sym-item img { background: var(--color-nav, #1a1a2e); border-radius: 0; padding: 2px; }
.rr-label { flex: 1; font-weight: 500; }
.rr-usage { font-size: .75rem; color: #bbb; white-space: nowrap; }
.rr-tag   { font-size: .7rem; font-weight: 700; padding: .1rem .4rem; border-radius: 0; white-space: nowrap; }
.rr-tag-match { background: #d4edda; color: #155724; }
.rr-tag-asp   { background: var(--color-warning-bg, #fff3cd); color: #856404; }
.rr-tag-ten   { background: #f8d7da; color: #721c24; }
.rank-hyp-title { font-size: .75rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .04em; margin: 1rem 0 .4rem; }
.rank-hyp { font-size: .88rem; color: #555; line-height: 1.6; border-left: 3px solid var(--color-border, #e0e0e0); padding-left: .7rem; margin: 0 0 .45rem; }
.rank-q-title { font-size: .75rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .04em; margin: 1rem 0 .3rem; }
.rank-q-list { font-size: .88rem; color: #555; line-height: 1.7; margin: 0; padding-left: 1.2rem; }
.rank-edit-link { font-size: .82rem; color: var(--color-accent, #4a90d9); text-decoration: none; display: inline-block; margin-top: .9rem; }
.rank-edit-link:hover { text-decoration: underline; }
.btn-rank { display: inline-block; margin-top: .5rem; padding: .5rem 1.1rem; background: var(--color-nav, #1a1a2e); color: #fff; border-radius: 0; text-decoration: none; font-size: .9rem; }
.btn-rank:hover { background: #2d2d4e; }

/* ── Shared ──────────────────────────────────────────────────── */
.page-note { font-size: .82rem; color: var(--color-text-4, #9ca3af); margin-top: 1rem; }
.empty-state { text-align: center; padding: 3rem; color: var(--color-text-4, #9ca3af); font-size: .95rem; }

/* ── Heatmap ─────────────────────────────────────────────────── */
.heat-table { border-collapse: collapse; font-size: .72rem; }
.heat-concept-th { min-width: 130px; }
.heat-sym-th { width: 22px; min-width: 22px; padding: 0 1px 3px; text-align: center; vertical-align: bottom; }
.heat-sym-img { width: 18px; height: 18px; object-fit: contain; display: block; margin: 0 auto; opacity: .7; filter: grayscale(30%); }
.heat-sym-label { display: block; writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: .65rem; color: var(--color-text-3, #6b7280); line-height: 1; margin: 0 auto 2px;
  max-height: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat-concept-td { padding: 1px 8px 1px 0; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; color: var(--color-text-2, #374151); line-height: 1; }
.heat-total { margin-left: .3rem; font-size: .65rem; color: var(--color-text-4, #9ca3af); }
.heat-cell { width: 20px; min-width: 20px; height: 20px; padding: 0; border: 1px solid #f3f4f6; }
.heat-on  { background: var(--color-affinity, #6366f1); border-color: #4f46e5; }
.heat-off { background: #f9fafb; }
.heat-row:hover .heat-concept-td { color: var(--color-text, #111); font-weight: 600; }
.heat-row:hover .heat-cell.heat-on  { background: #4f46e5; }
.heat-row:hover .heat-cell.heat-off { background: #f0f0f8; }

/* ── Bimap link card ─────────────────────────────────────────── */
.bimap-link-card {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  background: #f0f4ff; border-radius: 0; padding: 1rem 1.2rem;
  text-decoration: none; color: inherit; transition: background .15s;
  border: 1px solid #c7d2fe;
}
.bimap-link-card:hover { background: #e0e9ff; }
.bimap-link-icon { font-size: 2.2rem; flex-shrink: 0; }
.bimap-link-body { flex: 1; min-width: 0; }
.bimap-link-title { font-size: 1rem; font-weight: 700; color: #3730a3; margin-bottom: .2rem; }
.bimap-link-desc  { font-size: .82rem; color: var(--color-text-2, #4b5563); line-height: 1.5; }
.bimap-link-arrow { font-size: 1.4rem; color: var(--color-affinity, #6366f1); flex-shrink: 0; }

/* ── Quadrant chart ──────────────────────────────────────────── */
#idCanvas { display: block; width: 100%; cursor: crosshair; }
.quad-legend {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .5rem; margin-top: 1rem;
}
.quad-legend-item {
  display: flex; align-items: center; gap: .45rem;
  font-size: .78rem; color: #555; line-height: 1.4;
}
.quad-dot {
  width: 10px; height: 10px; border-radius: 0; flex-shrink: 0;
}

/* ── Bottom nav ──────────────────────────────────────────────── */
.sym-nav {
  display: flex; flex-wrap: wrap; gap: .5rem;
  padding-top: 1.5rem; border-top: 1px solid var(--color-border, #e5e7eb); margin-top: 2rem;
}
.sym-nav a { font-size: .82rem; color: var(--color-text-3, #6b7280); text-decoration: none; padding: .3rem .65rem; border: 1px solid var(--color-border, #e5e7eb); border-radius: 0; }
.sym-nav a:hover { background: #f8f9ff; color: var(--color-text-2, #374151); }

/* ── Concept Radial diagram ─────────────────────────────────── */
.cr-wrap { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-top: .75rem; }
.cr-sidebar { flex: 0 0 160px; }
.cr-sidebar-label { font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--color-text-3, #9ca3af); margin-bottom: .3rem; }
.cr-concept-list { display: flex; flex-direction: column; gap: .2rem; max-height: 280px; overflow-y: auto; }
.cr-concept-btn { background: none; border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 0; padding: .28rem .55rem; font-size: .78rem; cursor: pointer;
  text-align: left; color: var(--color-text-2, #374151); }
.cr-concept-btn.active { background: var(--color-nav, #1a1a2e); color: #fff; border-color: var(--color-nav, #1a1a2e); font-weight: 600; }
.cr-concept-btn:hover:not(.active) { background: var(--color-surface-2, #f4f4f8); }
.cr-select { width: 100%; padding: .3rem .5rem; border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 0; font-size: .8rem; background: var(--color-surface, #fff); font-family: inherit; }
.cr-check { display: flex; align-items: center; gap: .4rem; font-size: .8rem; cursor: pointer; }
.cr-diagram-wrap { flex: 1; min-width: 260px; background: #f9fafb;
  border: 1px solid var(--color-border, #e5e7eb); border-radius: 0; overflow: hidden; }

/* ── Symbol AI cards ──────────────────────────────────────── */
.smai-card { border: 1px solid var(--color-border, #e5e7eb); border-radius: 0;
  padding: 1rem 1.1rem; margin-bottom: .65rem; background: var(--color-surface, #fff); }
.smai-header { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.smai-img { width: 40px; height: 40px; object-fit: contain; border-radius: 0;
  background: var(--color-bg-dark, #1a1a2e); padding: 3px; flex-shrink: 0; }
.smai-motif { font-style: italic; color: var(--color-shadow, #7c3aed); font-size: .85rem; }
.smai-conf { background: var(--color-accent, #6c6ca8); color: #fff; border-radius: 0;
  padding: .1rem .45rem; font-size: .72rem; font-weight: 600; }
.smai-role { display: inline-block; background: #faf5ff; color: var(--color-shadow, #7c3aed); border-radius: 0;
  padding: .15rem .6rem; font-size: .76rem; font-weight: 600; margin-bottom: .4rem; }
.smai-text { color: var(--color-text-2, #555); font-size: .88rem; line-height: 1.6; margin: 0 0 .4rem; }
.smai-alts { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .4rem; }
.smai-alt { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 0;
  padding: .05rem .45rem; font-size: .72rem; color: #64748b; }
.smai-metrics { display: flex; gap: .4rem; flex-wrap: wrap; }
.smai-mbadge { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 0;
  padding: .1rem .5rem; font-size: .74rem; color: var(--color-text-2, #555); }
.smai-mbadge-pos { color: var(--color-success, #16a34a); border-color: #bbf7d0; background: #f0fdf4; }
.smai-mbadge-neg { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.smai-spinner { width: 20px; height: 20px; border: 2px solid var(--color-border, #e5e7eb); border-top-color: var(--color-shadow, #7c3aed);
  border-radius: 50%; animation: smai-spin .7s linear infinite; margin: 0 auto .6rem; }
@keyframes smai-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  .smai-header { gap: .4rem; }
  .smai-img { width: 32px; height: 32px; }
}
