/* apps/tools/workscope/static/tools/workscope/css/workscope.css */

.ws-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

/* ---------- Hero ---------- */
.ws-hero { text-align: center; margin-bottom: 28px; }
.ws-hero h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  letter-spacing: -0.02em;
}
.ws-hero-compact h1 { font-size: 1.5rem; }
.ws-tagline { margin: 0 0 4px; color: #333; font-size: 1rem; }
.ws-sub { margin: 0; color: #888; font-size: 0.85rem; }

/* ---------- Nav ---------- */
.ws-nav {
  display: flex;
  gap: 4px;
  margin: 0 0 22px;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.ws-nav::-webkit-scrollbar { display: none; }
.ws-nav a {
  flex-shrink: 0;
  padding: 10px 16px;
  text-decoration: none;
  color: #666;
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.12s;
}
.ws-nav a:hover { color: #2a70d8; }
.ws-nav a.ws-nav-active {
  color: #2a70d8;
  border-bottom-color: #2a70d8;
}

/* ---------- Messages ---------- */
.ws-messages { margin-bottom: 16px; }
.ws-msg {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.ws-msg-error { background: #fee; color: #c00; border: 1px solid #fcc; }
.ws-msg-success { background: #efe; color: #060; border: 1px solid #cfc; }
.ws-msg-info { background: #eef; color: #006; border: 1px solid #ccf; }

/* ---------- Form ---------- */
.ws-form {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.ws-field { margin-bottom: 18px; }
.ws-field > label { display: block; font-weight: 600; margin-bottom: 6px; }
.ws-field input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
}
.ws-field small {
  display: block; color: #888; font-size: 0.8rem; margin-top: 4px;
}

.ws-file-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 2px dashed #c5d3e0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.ws-file-label:hover { border-color: #4a90e2; background: #f5f9ff; }
.ws-file-icon { font-size: 2rem; }
.ws-file-text strong { display: block; font-size: 1rem; color: #333; }
.ws-file-text small { display: block; color: #888; font-size: 0.8rem; margin-top: 2px; }
.ws-file-label input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ws-preview {
  margin-top: 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.ws-preview img {
  max-width: 100%;
  max-height: 320px;
  display: block;
  border-radius: 6px;
}
.ws-preview .ws-btn-ghost {
  align-self: center;
  padding: 8px 24px;
  font-size: 0.9rem;
}

.ws-consent {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.ws-consent legend { font-weight: 600; padding: 0 6px; color: #333; }
.ws-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.ws-check:last-child { border-bottom: none; }
.ws-check input[type="checkbox"] {
  margin-top: 4px; width: 18px; height: 18px;
}
.ws-check span strong {
  display: block; font-weight: 500; font-size: 0.92rem; color: #333;
}
.ws-check span small {
  display: block; color: #888; font-size: 0.78rem; margin-top: 2px;
}
.ws-check-required span strong::after {
  content: " *"; color: #c00;
}

/* ---------- Buttons ---------- */
.ws-btn-primary {
  width: 100%;
  padding: 14px;
  background: #2a70d8;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.ws-btn-primary:hover:not(:disabled) { background: #1c5cb8; }
.ws-btn-primary:disabled { background: #999; cursor: not-allowed; }
.ws-btn-primary.ws-btn-inline {
  width: auto;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 500;
}
.ws-btn-ghost {
  background: transparent;
  border: 1px solid #ccc;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: none;
  color: #555;
  display: inline-block;
}
.ws-btn-danger {
  background: #c33;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
}
.ws-btn-danger:hover { background: #a22; }
.ws-btn-sm { padding: 6px 12px; font-size: 0.82rem; }

/* ---------- Spinner ---------- */
.ws-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ws-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes ws-spin { to { transform: rotate(360deg); } }

.ws-blocked {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 10px;
  padding: 22px;
  text-align: center;
}
.ws-blocked p { margin: 0 0 14px; color: #8a6000; }

/* ---------- Recent / Feed grid ---------- */
.ws-recent { margin-top: 40px; }
.ws-recent h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  color: #555;
  margin: 0 0 14px;
}
.ws-see-all {
  font-size: 0.85rem;
  font-weight: normal;
  color: #2a70d8;
  text-decoration: none;
}
.ws-see-all:hover { text-decoration: underline; }

.ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.ws-grid-feed {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.ws-card {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s, box-shadow 0.12s;
  position: relative;
}
.ws-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.ws-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.ws-card-body {
  padding: 10px 12px;
}
.ws-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-card-title-muted {
  color: #888;
  font-weight: 400;
  font-family: monospace;
}
.ws-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 4px;
}
.ws-card-stats {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: #888;
}
.ws-kind {
  background: #eef4ff;
  color: #2a70d8;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- Feed controls ---------- */
.ws-feed-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #fafafa;
  border-radius: 10px;
}
.ws-feed-sort,
.ws-feed-kinds {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ws-feed-sort a,
.ws-feed-kinds a {
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  font-size: 0.85rem;
  text-decoration: none;
  color: #555;
  transition: all 0.12s;
}
.ws-feed-sort a:hover,
.ws-feed-kinds a:hover {
  border-color: #2a70d8;
  color: #2a70d8;
}
.ws-feed-sort a.ws-active,
.ws-feed-kinds a.ws-active {
  background: #2a70d8;
  border-color: #2a70d8;
  color: #fff;
  font-weight: 500;
}

/* ---------- Pagination ---------- */
.ws-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding: 16px 0;
}
.ws-pagination a {
  padding: 8px 14px;
  background: #f5f5f5;
  border-radius: 6px;
  text-decoration: none;
  color: #444;
  font-size: 0.9rem;
}
.ws-pagination a:hover { background: #e8e8e8; }
.ws-page-info {
  color: #888;
  font-size: 0.9rem;
}

.ws-empty-feed {
  text-align: center;
  padding: 50px 20px;
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 12px;
}
.ws-empty-feed p { margin: 0 0 14px; color: #666; }

/* ---------- My Scene ---------- */
.ws-my-summary {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.ws-anon-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.ws-card-my {
  position: relative;
}
.ws-card-my a {
  text-decoration: none;
  color: inherit;
  display: block;
}
.ws-card-withdraw {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}
.ws-card-withdraw button {
  opacity: 0.85;
  backdrop-filter: blur(4px);
  background: rgba(204, 51, 51, 0.9);
}
.ws-card-withdraw button:hover { opacity: 1; }

.ws-status-processing { color: #888; }
.ws-status-rejected { color: #c33; }
.ws-status-blurred { color: #999; }
.ws-status-advised { color: #2a70d8; }
.ws-status-ready { color: #060; font-weight: 600; }

/* ---------- Detail page ---------- */
.ws-breadcrumb { margin-bottom: 14px; }
.ws-breadcrumb a {
  color: #2a70d8;
  text-decoration: none;
  font-size: 0.9rem;
}
.ws-detail-header h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1.4rem;
}
.ws-kind-badge {
  background: #eef4ff;
  color: #2a70d8;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: normal;
}
.ws-meta-line {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.ws-dot { margin: 0 6px; }
.ws-owner-tag {
  background: #fff3cd;
  color: #856404;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
}
.ws-image-wrap {
  background: #fafafa;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 24px;
}
.ws-detail-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.ws-blur-note {
  display: block;
  margin-top: 8px;
  color: #666;
  font-size: 0.78rem;
}

/* ---------- Owner withdraw section ---------- */
.ws-owner-actions {
  margin-bottom: 20px;
}
.ws-withdraw-details {
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 10px;
  padding: 12px 16px;
}
.ws-withdraw-summary {
  cursor: pointer;
  color: #8a6000;
  font-weight: 500;
  font-size: 0.9rem;
  outline: none;
}
.ws-withdraw-summary:hover { color: #5e4400; }
.ws-withdraw-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #ffd54f;
}
.ws-withdraw-body p {
  color: #5e4400;
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.ws-advice {
  background: #f5f9ff;
  border-left: 4px solid #2a70d8;
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 22px;
}
.ws-advice h2 { margin: 0 0 12px; font-size: 1.05rem; color: #1c5cb8; }
.ws-advice-icon { margin-right: 6px; }
.ws-advice-body { color: #222; line-height: 1.6; }
.ws-advice-body p { margin: 0 0 10px; }
.ws-advice-meta {
  display: block;
  margin-top: 12px;
  color: #888;
  font-size: 0.78rem;
}

.ws-detected {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 22px;
}
.ws-detected h2 { margin: 0 0 10px; font-size: 1rem; color: #555; }
.ws-detected-list { list-style: none; padding: 0; margin: 0; }
.ws-detected-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.ws-detected-list li:last-child { border-bottom: none; }
.ws-detected-list small { color: #888; font-size: 0.78rem; }
.ws-conf {
  margin-left: auto;
  background: #eef4ff;
  color: #2a70d8;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
}
.ws-detected-note {
  display: block;
  margin-top: 10px;
  color: #888;
  font-size: 0.78rem;
}

/* ---------- Comments ---------- */
.ws-comments { margin-top: 30px; }
.ws-comments h2 {
  font-size: 1.1rem;
  color: #444;
  margin: 0 0 16px;
}
.ws-comment-count { color: #888; font-weight: normal; font-size: 0.9rem; }

.ws-comment-form {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
}
.ws-comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.ws-comment-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ws-comment-form-row input[type="text"] {
  flex: 1;
  min-width: 140px;
  padding: 9px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.9rem;
}

.ws-comment-list { list-style: none; padding: 0; margin: 0; }
.ws-comment-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  position: relative;
  scroll-margin-top: 80px;
}
.ws-comment-item.ws-hidden { opacity: 0.6; background: #fafafa; }
.ws-hidden-banner {
  background: #fff3cd;
  color: #856404;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.ws-hidden-banner small { color: #999; margin-left: 4px; }

.ws-comment-head {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 6px;
}
.ws-comment-author { font-weight: 600; color: #333; }
.ws-comment-body {
  color: #222;
  font-size: 0.95rem;
  line-height: 1.55;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.ws-comment-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.ws-vote-btn,
.ws-report-toggle {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  color: #555;
  transition: all 0.12s;
}
.ws-vote-btn:hover:not(:disabled),
.ws-report-toggle:hover:not(:disabled) {
  background: #ebebeb;
  border-color: #bbb;
}
.ws-vote-btn:disabled,
.ws-report-toggle:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.ws-vote-up.ws-active {
  background: #e7f3ff;
  border-color: #2a70d8;
  color: #1c5cb8;
  font-weight: 600;
}
.ws-vote-down.ws-active {
  background: #ffe7e7;
  border-color: #d83a3a;
  color: #b82828;
  font-weight: 600;
}
.ws-report-toggle.ws-reported {
  background: #fff3cd;
  color: #856404;
  border-color: #ffd54f;
}
.ws-report-count-badge {
  background: #ffe0e0;
  color: #c33;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  margin-left: auto;
}

.ws-report-panel {
  margin-top: 12px;
  padding: 12px;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}
.ws-report-panel select,
.ws-report-panel textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.88rem;
  font-family: inherit;
  margin-bottom: 8px;
  box-sizing: border-box;
}
.ws-report-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ws-empty {
  list-style: none;
  text-align: center;
  padding: 30px 20px;
  color: #999;
  font-size: 0.9rem;
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 10px;
}

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .ws-container { padding: 12px; }
  .ws-hero h1 { font-size: 1.6rem; }
  .ws-hero-compact h1 { font-size: 1.3rem; }
  .ws-form { padding: 16px; }
  .ws-file-label { padding: 14px; }
  .ws-grid { grid-template-columns: repeat(2, 1fr); }
  .ws-grid-feed { grid-template-columns: 1fr; }
  .ws-comment-form-row { flex-direction: column; align-items: stretch; }
  .ws-comment-form-row input[type="text"] { width: 100%; }
  .ws-comment-actions { gap: 4px; }
  .ws-vote-btn, .ws-report-toggle { padding: 4px 8px; font-size: 0.78rem; }
  .ws-feed-controls { padding: 10px; }
}
