/*  NEW STANDALONE CREATE.CSS  */

/* create.css */
form#create-form {
  flex: 1 1 300px;
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: #dff2df;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  border-left: 4px solid #3CB043;
}
form#create-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #0e76bc;
}
form#create-form input[type="text"],
form#create-form input[type="url"] {
  width: 100%;
  padding: 0.7rem;
  margin-top: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 0.6rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  font-size: 1rem;
  color: #0e76bc;
}

body.dark form#create-form input,
body.dark form#create-form input::placeholder,
body.dark form#create-form label {
  color: #3CB043;
 /* background: #2a2a2a;*/
  border-color: #444;
}

body.dark form#create-form label-colour {
  color: #0e76bc;
 /* background: #2a2a2a;*/
  border-color: #444;
}

body.light form#create-form label-colour {
  color: #0e76bc;
 /* background: #2a2a2a;*/
  border-color: #444;
}

/* fieldset to stack inputs & auto-add new ones */
fieldset#items-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0 1rem;
  border: none;
  padding: 0;
  color: #3CB043;
}
#items-container input[type="text"] {
  width: 100%;
  box-sizing: border-box;
}

/* submit button */
form#create-form button[type="submit"] {
  display: block;
  margin: 2rem auto 0;
  background-color: #0e76bc;
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  transition: background 0.3s ease;
}
form#create-form button[type="submit"]:hover {
  background-color: #095e94;
}

body.dark form#create-form {
  border-left-color: #0e76bc;
}

body.dark #output-panel {
  background: #1a1a1a;
  color: #f0f0f0;
  border-left-color: #3cb043;
}

body.dark #output-panel a {
  color: #3cb043;
}

body.dark form#create-form {
  background: #1f1f1f;
  color: #3CB043;
}

/* output panel (QR, links, share-buttons) */
#output-panel {
  display: none;
  background: #f6f6f6;
  border-left: 4px solid #0e76bc;
  padding: 2rem;
  border-radius: 1rem;
  margin: 2rem auto;
  max-width: 600px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
#output-panel a {
  word-break: break-word;
  color: #0e76bc;
}

#output-panel h2 {
  margin-top: 0;
}
.form-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

#output-panel {
  flex: 1 1 300px;
  max-width: 400px;
  display: none;
  background: var(--panel-bg, #f6f6f6);
  border-left: 4px solid #0e76bc;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
/* style the QR wrapper */
#output-panel #qr {
  margin: 1.5rem auto 0;           /* center horizontally */
  padding: 1rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: max-content;             /* shrink‐wrap to its contents */
}

/* override the generated canvas */
#output-panel #qr canvas {
  display: block;
  margin: 0 auto;
  width: 150px !important;        /* force smaller QR */
  height: 150px !important;
  image-rendering: pixelated;     /* keep crisp edges */
}

/* share-buttons underneath */
.share-label {
  margin-top: 1.5rem;
  font-weight: bold;
}
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  background: var(--theme-color, #0e76bc);
  color: #fff;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}
.share-btn .share-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
}
.share-text {
  margin-top: 0.25rem;
  font-weight: 600;
}
.share-btn:hover {
  background: var(--accent-color, #2fa038);
}

/* ────────────────────────────────────────────────────────────
   ² Colour-Preview Table
   ──────────────────────────────────────────────────────────── */
.color-preview {
  margin: 1.5rem 0;
}
.color-preview p {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: #3CB043;
}
.color-preview table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.color-preview .preview-cell {
  padding: 0.1rem;
  text-align: center;
  font-weight: bold;
  font-size: 2rem;
}
.color-preview .preview-cell.light {
  background: #fff;
}
.color-preview .preview-cell.dark {
  background: #000;
}

.colour-warning {
  color: red;
}

/* ────────────────────────────────────────────────────────────
   ² Embed Panel
   ──────────────────────────────────────────────────────────── */

   /* EMBED PANEL */
#embed-panel {
  flex: 1 1 300px;
  max-width: 600px;
  display: none;              /* shown when links are ready */
  background: var(--panel-bg, #f6f6f6);
  border-left: 4px solid #3CB043;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}
#embed-panel h2 {
  margin-top: 0;
}
#embed-panel label {
  display: block;
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: .25rem;
  color: #0e76bc;
}
#embed-panel textarea {
  width: 100%;
  height: 2rem;
  padding: .5rem;
  font-family: monospace;
  font-size: .9rem;
  border: 1px solid #ccc;
  border-radius: .5rem;
  resize: none;
}
#embed-panel button {
  margin-top: .5rem;
  background: #0e76bc;
  color: white;
  border: none;
  padding: .5rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: .9rem;
}
#embed-panel button:hover {
  background: #095e94;
}
body.dark #embed-panel {
  background: #1a1a1a;
  color: #f0f0f0;
  border-left-color: #0e76bc;
}

body.dark #embed-panel a {
  color: #3cb043;
}

body.dark form#embed-panel {
  background: #1f1f1f;
  color: #3CB043;
}
