/* One file for feedback: the parts that used to be separate files follow in their old order, each in its old layer. */
/* main.css */

/* 1. Define your layer order. */
@layer reset, global, layout, components, overrides;

@import url("../components/reset.fb54b2947a87.css");
@import url("../components/palette.8cd8c2d26dd9.css") layer(variables);

/* ==== variables.css (layer variables) ==== */
@layer variables {
/* Feedback colours on top of components/palette.css */

:root {
  --game-primary-color: #00ff88;
  --background-white: var(--surface);
  --text-muted-light: var(--ink-3);
  --background-placeholder: var(--surface-2);
  --background-neutral: #ecf0f1;
  --border-neutral: var(--line-strong);

  /* Feedback-specific colors */
  --feedback-filter-bg: #B6F5D8;
  --feedback-filter-text: #900;
  --feedback-box-bg: #e7f3fe;
  --feedback-box-border: #A4193D;
  --feedback-box-text: #1c3d5a;
}
}

/* ==== global.css (layer global) ==== */
@layer global {
/* global.css */

/* Global Styles - Reusable components and utilities */

/* Body Defaults */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

/* Messages */
.error-message {
    padding: 12px 20px;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: 500;
    color: var(--surface);
    background: var(--danger-color);
}
}

/* ==== layout.css (layer layout) ==== */
@layer layout {
/* layout.css */
.section-title {
    display: inline-block;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    padding: 0 18px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    margin-bottom: 8px;
}

.section-title h2 {
    font-size: 1.15rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f4c542 0%, var(--accent-gold) 50%, #f4c542 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: 1px;
}
}

/* ==== components/button.css (layer components) ==== */
@layer components {
/* ===== Feedback Toolbar ===== */
.feedback-toolbar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .75rem;
  justify-content: center;
}

/* All / Mine sub-filter — same family as Public|Members, parchment variant */
.theme-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  padding: 3px 14px;
  border: 2px solid #DECEBE;
  border-radius: 5px;
  background: linear-gradient(180deg, #f5e9c8 0%, #e6d4a3 100%);
  color: #5a4a30;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  transition: background .25s, color .25s, box-shadow .25s, transform .1s;
}

.theme-tab:hover,
.theme-tab:focus {
  background: linear-gradient(180deg, #fff3d1 0%, #f0dca8 100%);
  color: #2c2517;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.theme-tab.active {
  background: linear-gradient(180deg, var(--accent-gold) 0%, #b48a1f 100%);
  color: #2c2517;
  border-color: #8a6a14;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.theme-tab-count {
  display: inline-block;
  padding: .05rem .4rem;
  background: rgba(44, 37, 23, 0.18);
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #2c2517;
}
.theme-tab.active .theme-tab-count {
  background: rgba(255, 255, 255, 0.35);
}

/* ===== Post Message Button ===== */
.submit-feedback-btn {
  margin-left: auto;
  padding: .3rem 1.7rem;
  border: none;
  border-radius: 6px;
  background: #2c2517;
  color: #e8a435;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  box-sizing: border-box;
}

.submit-feedback-btn:hover {
  background: #3d3226;
  color: #f0b94d;
}

/* ===== Round Plus Buttons (two-floor posting) ===== */
.post-btns {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Shared catalog-style button (reused from /catalog/hybrid/ buttons-cloud) */
.post-plus-btn,
.floor-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border: 2px solid #DECEBE;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  background-color: #155E95;
  color: #DECEBE;
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  line-height: 1;
  box-sizing: border-box;
}
.post-plus-btn:hover,
.post-plus-btn:focus,
.floor-link:hover,
.floor-link:focus {
  background-color: #FA9386;
  color: rgba(0, 0, 0, 0.3);
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
}
.floor-link.active {
  background-color: #FA9386;
  color: rgb(108, 76, 36);
  font-weight: bold;
}

/* Size differences — + buttons are compact; Members + slightly larger as the accent */
.post-plus-public {
  width: 34px;
  height: 30px;
  font-size: 1.1rem;
}
.post-plus-members {
  width: 40px;
  height: 34px;
  font-size: 1.35rem;
}
/* Locked is its own colour, not a weaker one. */
.post-plus-members.locked { background-color: #3F5A6B; }
.post-plus-members.locked:hover,
.post-plus-members.locked:focus { background-color: #FA9386; color: rgb(108, 76, 36); }

/* Floor switch wrapper */
.floor-switch {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.floor-link {
  min-width: 96px;
  padding: 3px 10px;
  font-size: .95rem;
}
.floor-sep { display: none; }

.feedback-toolbar-tabs { margin-top: .35rem; }

/* ===== Lock Overlay (Members floor for anonymous) ===== */
.floor-lock-overlay {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}
.floor-lock-card {
  background: #fdf6e3;
  border: 1px solid #d6c084;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(44, 37, 23, 0.08);
}
.floor-lock-icon { font-size: 2rem; margin-bottom: .35rem; }
.floor-lock-title {
  font-weight: 700;
  color: #2c2517;
  font-size: 1.15rem;
  margin-bottom: .35rem;
}
.floor-lock-text { color: #5a4a30; font-size: .9rem; margin-bottom: 1rem; }
.floor-lock-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.floor-lock-btn {
  display: inline-block;
  padding: .4rem 1rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid #2c2517;
  color: #2c2517;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.875rem;
}
.floor-lock-btn:hover { background: #f3e9c9; }
.floor-lock-btn-primary { background: #2c2517; color: #e8a435; border-color: #2c2517; }
.floor-lock-btn-primary:hover { background: #3d3226; color: #f0b94d; }
}

/* ==== components/card.css (layer components) ==== */
@layer components {
/* card.css */

/* Feedback containers */
.feedback-container {
  width: 100%;
  max-width: 700px;
  margin: 1rem auto;
}

.feedback-form-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.feedback-body {
  padding: 0.5rem;
}

/* Feedback card */
.feedback-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 4px solid #4caf50;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.feedback-card.pending {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

/* Header: avatar + username + timestamp in one row */
.feedback-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feedback-card-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.user-info {
  min-width: 0;
}

.username {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1f2937;
}

.feedback-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.feedback-timestamp {
  font-size: 0.875rem;
  color: var(--ink-3);
  white-space: nowrap;
}

.status-badge {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
}

.pending-badge {
  color: #d97706;
}

/* Body: message content */
.feedback-card-body {
  padding: 4px 0 2px 40px;
}

.feedback-content {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #374151;
}

/* Admin actions */
.feedback-card-actions {
  padding: 4px 0 0 40px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-2);
}

.action-btn:hover {
  color: #111827;
}

.reply-btn {
  color: #4f46e5;
}

.reply-btn:hover {
  color: #3730a3;
}

.delete-form {
  display: inline;
}

.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-3);
  padding: 0;
}

.delete-btn:hover {
  color: #dc2626;
}

/* Admin reply — indented, subtle */
.admin-reply-card {
  margin: 6px 0 2px 40px;
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
}

.admin-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.admin-reply-user {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-avatar,
.admin-avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.admin-avatar {
  object-fit: cover;
}

.admin-avatar-placeholder {
  background: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
  font-weight: 700;
  font-size: 14px;
}

.admin-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1e40af;
}

.admin-full-name {
  font-weight: 400;
  color: var(--ink-2);
}

.admin-reply-timestamp {
  font-size: 0.875rem;
  color: var(--ink-3);
}

.admin-reply-body {
  padding: 0;
}

.admin-reply-content {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #374151;
}

.feedback-content code,
.admin-reply-content code {
  background: var(--ink);
  color: #0ff;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
}
}

/* ==== components/form.css (layer components) ==== */
@layer components {
/* ==== Submit Feedback Form ==== */

.feedback-container {
  max-width: 600px;
  margin: 2.5rem auto 0;
  padding: 0 .5rem;
}

/* Title above form */
.form-title {
  font-size: 0.875rem;
  font-weight: 800;
  color: #0a0a12;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-left: 1rem;
  padding: 0 0 .4rem .2rem;
}

/* Composer: button + fields */
.feedback-composer {
  display: flex;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}

/* Submit button — matches login btn-login */
.feedback-btn-submit {
  background: #155E95;
  color: var(--gold-light);
  border: none;
  border-radius: 8px 0 0 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  padding: 10px 26px;
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow:
    0 0 8px rgba(255, 214, 102, .4),
    0 0 20px rgba(255, 214, 102, .15);
  box-shadow:
    inset 0 0 20px rgba(255, 214, 102, .06),
    4px 0 8px rgba(0, 0, 0, .4);
  transition: background .2s;
}

.feedback-btn-submit:hover {
  background: #FA9386;
}

/* Form fields — matches login teal background */
.feedback-form-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: .75rem .6rem;
  box-sizing: border-box;
  min-width: 0;
  background: #1D546D;
}

/* Textarea */
.textarea-wrap {
  position: relative;
}

.feedback-form-fields textarea {
  width: 100%;
  padding: .45rem .55rem;
  padding-bottom: 1rem;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(158, 59, 59, .2);
  border-radius: 10px;
  font-family: inherit;
  font-size: .9rem;
  color: #2c2517;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
  transition: border-color .15s, background .15s;
}

.feedback-form-fields textarea:focus {
  outline: none;
  border-color: #9E3B3B;
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(158, 59, 59, .12);
}

.char-count {
  position: absolute;
  bottom: 4px;
  left: 6px;
  font-size: 0.875rem;
  font-weight: 800;
  color: #8A7A5F;
  pointer-events: none;
  transition: color .15s;
}

/* Footer row: info + honeypot on one line */
.form-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.info-message {
  font-size: 0.875rem;
  color: #DECEBE;
}

/* Errors */
.error-message {
  background: #fdf0ed;
  border: 1px solid #e8c4b8;
  border-radius: 4px;
  color: #8b3a2a;
  padding: .35rem .5rem;
  font-size: 0.875rem;
}

.field-error {
  color: #fdf0ed;
  font-size: 0.875rem;
}

.honeypot-button {
  background: transparent;
  color: #5E8296;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
  white-space: nowrap;
}
}

/* ==== components/responsive.css (layer overrides) ==== */
@layer overrides {
/* Responsive */
@media (max-width: 480px) {
  .feedback-composer {
    width: 100%;
    padding: 0;
  }

  .feedback-card-body,
  .feedback-card-actions,
  .admin-reply-card {
    margin-left: 0;
    padding-left: 0;
  }

  .feedback-toolbar {
    gap: .4rem;
    flex-wrap: nowrap;
    padding: 0 2px;
    justify-content: center;
  }
  .submit-feedback-btn { font-size: 0.875rem; }

  .post-plus-public { width: 28px; height: 28px; font-size: 1rem; }
  .post-plus-members { width: 36px; height: 36px; font-size: 1.35rem; }

  .floor-switch { font-size: 0.875rem; gap: .35rem; margin: 0; }
  .floor-lock-card { padding: 1rem; }

  /* Tabs row: All + Mine each 50% of screen width */
  .feedback-toolbar-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0;
    margin-top: .4rem;
    width: 100%;
  }
  .feedback-toolbar-tabs .theme-tab {
    flex: 1 1 50%;
    text-align: center;
    padding: .4rem .25rem;
    font-size: 0.875rem;
    border-radius: 0;
  }

  .feedback-container { margin: .5rem auto; padding: 0 2px; }
  .feedback-form-fields { padding: .4rem; }
  .real-button { padding: 6px 6px; font-size: 0.875rem; }
}
}
