/* gallery_social.css — comments, @mentions and reactions on Class Gallery photos (needs gallery_social.js) */

/* ---- under each photo card ---- */
.gs-bar{
  display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%;
  margin-top:10px; padding:8px 12px; border:1px solid rgba(11,93,63,.18); border-radius:12px;
  background:#fff; color:var(--opay-deep,#0B5D3F); font:600 .88rem 'Source Sans 3',sans-serif; cursor:pointer; text-align:left;
}
.gs-bar:hover{ background:var(--opay-pale,#eef8f2); }
.gs-bar .gs-rx{ display:inline-flex; align-items:center; gap:6px; color:var(--muted,#4C6156); font-weight:600; }
.gs-bar .gs-rx b{ font-size:1.05rem; font-weight:400; letter-spacing:1px; }
.gs-bar .gs-cm{ white-space:nowrap; }
.gal-card .frame{ cursor:zoom-in; }

/* ---- the photo viewer ---- */
dialog.gs-viewer{
  border:0; padding:0; margin:auto; border-radius:18px; overflow:hidden; background:#fff;
  width:min(1120px,100vw); height:min(92dvh,780px); box-shadow:0 40px 90px rgba(0,0,0,.5);
}
dialog.gs-viewer[open]{ display:grid; grid-template-columns:minmax(0,1.35fr) minmax(320px,1fr); }
dialog.gs-viewer::backdrop{ background:rgba(6,30,20,.82); }
.gs-x{
  position:absolute; top:10px; right:10px; z-index:5; width:38px; height:38px; border-radius:50%; border:0;
  background:#fff; color:#111; font-size:1.5rem; line-height:1; cursor:pointer; box-shadow:0 2px 10px rgba(0,0,0,.3);
}
.gs-img{ position:relative; background:#0b1f17; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:0; }
.gs-img img{ max-width:100%; max-height:100%; width:100%; flex:1; min-height:0; object-fit:contain; display:block; }
.gs-img .gs-cap{ margin:0; padding:10px 16px; color:#fff; font-size:.95rem; text-align:center; width:100%; background:rgba(0,0,0,.35); }
.gs-img .gs-cap:empty{ display:none; }

.gs-panel{ display:flex; flex-direction:column; min-height:0; min-width:0; position:relative; background:#fff; }
.gs-head{ padding:16px 56px 8px 16px; }
.gs-head h3{ margin:0; font-size:1.05rem; color:var(--opay-deep,#0B5D3F); overflow-wrap:anywhere; }
.gs-head p{ margin:2px 0 0; font-size:.82rem; color:var(--muted,#4C6156); }

.gs-react{ display:flex; flex-wrap:wrap; gap:6px; padding:6px 16px 12px; border-bottom:1px solid rgba(11,93,63,.12); }
.gs-react button{
  display:inline-flex; align-items:center; gap:5px; padding:5px 10px; border-radius:20px; border:1px solid rgba(11,93,63,.2);
  background:#fff; font:600 .85rem 'Source Sans 3',sans-serif; color:#33463d; cursor:pointer;
}
.gs-react button .e{ font-size:1.2rem; line-height:1; }
.gs-react button:hover{ background:var(--opay-pale,#eef8f2); }
.gs-react button.on{ background:#d9fdd3; border-color:#00a884; }

.gs-list{ flex:1; overflow-y:auto; padding:10px 16px; min-height:0; display:flex; flex-direction:column; gap:12px; }
.gs-empty{ margin:auto; text-align:center; color:var(--muted,#4C6156); font-size:.92rem; padding:16px 0; }
.gs-item{ display:flex; gap:10px; align-items:flex-start; }
.gs-av{ width:34px; height:34px; border-radius:50%; color:#fff; font-size:.75rem; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.gs-body{ min-width:0; flex:1; }
.gs-bubble{ background:#f0f2f5; border-radius:14px; padding:8px 12px; display:inline-block; max-width:100%; }
.gs-item.mine .gs-bubble{ background:#d9fdd3; }
.gs-name{ font-weight:700; font-size:.84rem; text-decoration:none; }
a.gs-name:hover{ text-decoration:underline; }
.gs-text{ margin:2px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; font-size:.94rem; line-height:1.4; color:#111b21; }
.gs-text a{ color:#027eb5; }
.gs-mention{ color:#027eb5; font-weight:600; }
.gs-mention.me{ background:rgba(2,126,181,.14); border-radius:4px; padding:0 3px; }
.gs-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:3px 4px 0; font-size:.76rem; color:#667781; }
.gs-meta button{ border:0; background:none; padding:0; font:600 .76rem 'Source Sans 3',sans-serif; color:#54656f; cursor:pointer; }
.gs-meta button:hover{ text-decoration:underline; }
.gs-meta button.del{ color:#a3281b; }
.gs-chips{ display:flex; flex-wrap:wrap; gap:4px; margin:4px 0 0 2px; }
.gs-chip{ display:inline-flex; align-items:center; gap:3px; padding:1px 8px; border-radius:12px; border:1px solid #e3e6e8; background:#fff; font:600 .8rem 'Source Sans 3',sans-serif; color:#54656f; cursor:pointer; }
.gs-chip.on{ border-color:#00a884; background:#e7fce3; }
.gs-picker{ display:flex; gap:2px; margin:4px 0 0 2px; padding:4px 8px; background:#fff; border-radius:24px; box-shadow:0 3px 14px rgba(11,20,26,.25); width:max-content; max-width:100%; }
.gs-picker button{ border:0; background:none; font-size:1.4rem; line-height:1; padding:3px 4px; border-radius:50%; cursor:pointer; }
.gs-picker button:hover{ transform:scale(1.25); }
.gs-picker button.on{ background:#d9fdd3; }

.gs-mentions{ position:absolute; left:12px; right:12px; bottom:70px; z-index:6; background:#fff; border-radius:12px; box-shadow:0 4px 18px rgba(11,20,26,.28); overflow:hidden; max-width:340px; }
.gs-mentions[hidden]{ display:none; }
.gs-mentions button{ display:flex; align-items:center; gap:10px; width:100%; padding:8px 12px; border:0; background:none; font:.92rem 'Source Sans 3',sans-serif; text-align:left; cursor:pointer; color:#111b21; }
.gs-mentions button.on, .gs-mentions button:hover{ background:#f0f2f5; }
.gs-mentions .gs-av{ width:28px; height:28px; font-size:.7rem; }

.gs-compose{ display:flex; align-items:flex-end; gap:8px; padding:10px 12px; background:#f0f2f5; }
.gs-compose textarea{
  flex:1; min-width:0; resize:none; border:0; outline:0; background:#fff; border-radius:20px; padding:10px 14px;
  font:.95rem 'Source Sans 3',sans-serif; line-height:1.35; max-height:110px; margin:0; color:#111b21;
}
.gs-compose button{ border:0; border-radius:20px; padding:0 18px; height:40px; background:#00a884; color:#fff; font:700 .9rem 'Source Sans 3',sans-serif; cursor:pointer; }
.gs-compose button:disabled{ opacity:.55; cursor:not-allowed; }
.gs-status{ margin:0; padding:0 14px 8px; min-height:1.1em; background:#f0f2f5; font-size:.8rem; color:#a3281b; }
.gs-hint{ margin:0; padding:6px 16px 0; font-size:.76rem; color:var(--muted,#4C6156); }

@media (max-width:800px){
  dialog.gs-viewer{ width:100vw; height:100dvh; max-height:100dvh; border-radius:0; }
  dialog.gs-viewer[open]{ grid-template-columns:1fr; grid-template-rows:34dvh minmax(0,1fr); }
  .gs-head{ padding-top:12px; }
}
@media (prefers-reduced-motion:no-preference){ .gs-picker button, .gs-react button{ transition:transform .12s, background .12s; } }
