/* ── Open Innovation Widget — open-widget.css ─────────────────── */

/* ── FAB (Floating Action Button) ── */
.open-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 9990;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(0,212,170,.35), 0 0 0 0 rgba(0,212,170,.4);
  transition: transform .18s ease, box-shadow .18s ease;
  animation: open-fab-pulse 2.4s ease-in-out infinite;
}
.open-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(0,212,170,.5), 0 0 0 8px rgba(0,212,170,.12);
}
.open-fab.active {
  animation: none;
  background: linear-gradient(135deg, #00b894 0%, #009974 100%);
  transform: rotate(45deg);
}
@keyframes open-fab-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,212,170,.35), 0 0 0 0 rgba(0,212,170,.4); }
  50%      { box-shadow: 0 4px 20px rgba(0,212,170,.35), 0 0 0 10px rgba(0,212,170,0); }
}

/* ── Backdrop ── */
.open-widget-backdrop {
  position: fixed; inset: 0; z-index: 9991;
  background: rgba(0,0,0,.35); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.open-widget-backdrop.open { opacity: 1; pointer-events: auto; }

/* ── Panel ── */
.open-widget-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9992;
  width: 480px; max-width: 100vw;
  background: #12141a; border-left: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: rgba(255,255,255,.92); font-size: 13px;
}
.open-widget-panel.open { transform: translateX(0); }

/* Header */
.ow-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(18,20,26,.92); backdrop-filter: blur(10px); flex-shrink: 0;
}
.ow-header-left { display: flex; align-items: center; gap: 8px; }
.ow-logo { font-size: 18px; }
.ow-title { font-weight: 700; font-size: 15px; }
.ow-kbd {
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.4);
  font-family: monospace;
}
.ow-close {
  background: none; border: none; color: rgba(255,255,255,.4); cursor: pointer;
  font-size: 16px; padding: 4px 8px; border-radius: 4px; transition: all .15s;
}
.ow-close:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); }

/* Body */
.ow-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.ow-section { margin-bottom: 20px; }
.ow-section-title {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.5);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px;
}

/* Quick actions */
.ow-quick-actions { display: flex; gap: 8px; }
.ow-qa-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03); color: rgba(255,255,255,.85); cursor: pointer;
  transition: all .15s; font-size: 12px;
}
.ow-qa-btn:hover {
  background: color-mix(in srgb, var(--qa-clr) 12%, transparent);
  border-color: color-mix(in srgb, var(--qa-clr) 40%, transparent);
  transform: translateY(-2px);
}
.ow-qa-icon { font-size: 22px; }
.ow-qa-label { font-weight: 600; }

/* Hot feed cards */
.ow-card {
  display: block; padding: 10px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02);
  margin-bottom: 6px; text-decoration: none; color: inherit; transition: all .15s;
}
.ow-card:hover {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12);
  text-decoration: none; transform: translateX(2px);
}
.ow-card-top { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.ow-card-type { font-size: 14px; flex-shrink: 0; }
.ow-card-title {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.88);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ow-card-meta {
  display: flex; gap: 10px; font-size: 11px; color: rgba(255,255,255,.35);
}

/* Digest */
.ow-digest-text {
  font-size: 12px; line-height: 1.6; color: rgba(255,255,255,.6);
  padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
}

/* Loading / empty */
.ow-loading, .ow-empty {
  text-align: center; padding: 16px 0; font-size: 12px; color: rgba(255,255,255,.3);
}

/* Footer */
.ow-footer {
  flex-shrink: 0; padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.ow-open-full {
  display: inline-block; padding: 8px 20px; border-radius: 8px; font-size: 13px;
  font-weight: 600; color: #00d4aa; background: rgba(0,212,170,.08);
  border: 1px solid rgba(0,212,170,.25); transition: all .15s; text-decoration: none;
}
.ow-open-full:hover {
  background: rgba(0,212,170,.15); border-color: rgba(0,212,170,.45);
  text-decoration: none;
}

/* ── Mini-form modal ── */
.ow-mini-overlay {
  position: fixed; inset: 0; z-index: 9995;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.ow-mini-form {
  width: 420px; max-width: calc(100vw - 32px);
  background: #181c25; border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  padding: 20px 24px; box-shadow: 0 24px 48px rgba(0,0,0,.4);
}
.ow-mini-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; color: rgba(255,255,255,.9); margin-bottom: 16px;
}
.ow-mini-close {
  background: none; border: none; color: rgba(255,255,255,.35); cursor: pointer;
  font-size: 16px; padding: 4px; border-radius: 4px;
}
.ow-mini-close:hover { color: rgba(255,255,255,.7); background: rgba(255,255,255,.06); }
.ow-mini-input {
  display: block; width: 100%; padding: 10px 12px; margin-bottom: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; color: rgba(255,255,255,.9); font-size: 13px; outline: none;
  font-family: inherit;
}
.ow-mini-input:focus { border-color: rgba(0,212,170,.45); }
.ow-mini-textarea {
  display: block; width: 100%; padding: 10px 12px; margin-bottom: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; color: rgba(255,255,255,.9); font-size: 13px; outline: none;
  resize: vertical; min-height: 80px; font-family: inherit; line-height: 1.5;
}
.ow-mini-textarea:focus { border-color: rgba(0,212,170,.45); }
.ow-mini-tag-input { font-size: 12px; padding: 8px 10px; }
.ow-mini-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ow-mini-cancel {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.6); cursor: pointer; transition: all .15s;
}
.ow-mini-cancel:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.ow-mini-submit {
  padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 700;
  border: none; color: #fff; cursor: pointer; transition: all .15s;
}
.ow-mini-submit:hover { filter: brightness(1.15); }
.ow-mini-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── Enlarged form ── */
.ow-mini-form--lg { width: 560px; }
.ow-mini-textarea--lg { min-height: 160px; }

/* ── Logo in header ── */
.ow-logo-img { vertical-align: middle; margin-right: 2px; }

/* ── File drop zone ── */
.ow-mini-drop {
  margin-bottom: 10px; padding: 10px 12px;
  border: 1px dashed rgba(255,255,255,.15); border-radius: 8px;
  background: rgba(255,255,255,.02); transition: all .15s;
}
.ow-mini-drop.ow-drop--active,
.ow-mini-drop:hover { border-color: rgba(0,212,170,.5); background: rgba(0,212,170,.04); }
.ow-drop-label {
  display: block; text-align: center; color: rgba(255,255,255,.4);
  font-size: 12px; cursor: pointer; padding: 4px 0;
}
.ow-drop-label:hover { color: rgba(255,255,255,.65); }
.ow-file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ow-file-card {
  position: relative; width: 88px; border-radius: 6px; overflow: hidden;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  text-align: center; padding-bottom: 4px;
}
.ow-file-thumb {
  width: 88px; height: 66px; object-fit: cover; display: block;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ow-file-icon {
  width: 88px; height: 66px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: rgba(255,255,255,.4); font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ow-file-name {
  display: block; font-size: 10px; color: rgba(255,255,255,.55);
  padding: 3px 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ow-file-rm {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,.6); border: none; color: rgba(255,255,255,.7);
  cursor: pointer; font-size: 10px; width: 16px; height: 16px;
  border-radius: 50%; line-height: 16px; text-align: center; padding: 0;
}
.ow-file-rm:hover { background: #ff6b6b; color: #fff; }

/* ── Responsive ── */
@media (max-width: 560px) {
  .open-widget-panel { width: 100vw; }
  .open-fab { bottom: 16px; right: 16px; width: 48px; height: 48px; }
  .ow-mini-form, .ow-mini-form--lg { width: calc(100vw - 24px); }
}
