:root{
  --salmon:#b63b26;
  --salmon-dark:#a1311e;
  --cream:#fffaf5;
  --ink:#1f2937;
  --muted:#6b7280;
  --card:#ffffff;
  --ring:#f3e7df;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
  color:var(--ink);
  background:linear-gradient(180deg,var(--cream),#fff);
}
.wrap{max-width:980px;margin:0 auto;padding:32px 20px 56px}
header{
  display:flex;
  flex-wrap: wrap;    /* ← THIS FIXES MOBILE SQUEEZE */
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border:1px solid var(--ring);border-radius:16px;
  background:#fff;
  box-shadow:0 6px 20px rgba(0,0,0,.04)
}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--ink)}
/* Circular logo with PNG inside */
.logo {
  width: 40px;                 /* circle size */
  height: 40px;
  border-radius: 999px;        /* makes it a circle */
  background-color: floralwhite;  /* fallback color / ring */
  background-image: url('/assets/ks_logo.png');
  background-size: cover;    /* how much of the circle the PNG fills */
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid black;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  color: transparent;          /* hide the KS text */
  font-size: 0;                /* extra insurance: no text visible */
}
.title{font-size:1.125rem;font-weight:800;letter-spacing:.2px}
.subtitle{font-size:.9rem;color:var(--muted)}
main{margin-top:28px}
.card{
  background:var(--card);border:1px solid var(--ring);border-radius:16px;padding:20px;
  box-shadow:0 8px 30px rgba(0,0,0,.04)
}
h1{margin:0 0 8px}
.lede{color:var(--muted);margin:0 0 18px}
.form-grid{display:grid;grid-template-columns:1fr;gap:14px}
label{font-weight:600}
input[type="text"],input[type="email"],select,textarea{
  width:100%;border:1px solid var(--ring);border-radius:10px;padding:10px 12px;font-size:1rem;background:#fff
}
input[type="file"]{font-size:.95rem}
.btn{
  display:inline-block;
  background:var(--salmon);
  color:#fff;font-weight:700;
  border-radius:10px;
  padding:12px 14px;
  text-decoration:none;
  border:none;
  cursor:pointer;
  transition:background .15s ease
}
.btn:hover{background:var(--salmon-dark)}
.badge{
  display:inline-flex;align-items:center;gap:6px;font-size:.85rem;padding:4px 10px;border-radius:999px;
  background:rgba(182,59,38,.08);color:var(--salmon);border:1px solid rgba(182,59,38,.25);margin-bottom:10px
}
.note{margin-top:14px;padding:10px 12px;border-radius:12px;border:1px dashed var(--ring);background:#fff;color:var(--muted)}
footer{margin-top:28px;color:var(--muted);font-size:.85rem;text-align:center}

/* --- Custom upload UI touches --- */

#submit-btn {
  padding: 16px 24px;
 
 font-size: 1.1rem;
}

/* File input wrapper */
.file-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.file-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background: #e5f0ff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  gap: 8px;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.file-trigger span.icon {
  font-size: 1.1rem;
}

.file-trigger:hover {
  background: #d4e5ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.file-trigger:active {
  transform: translateY(0);
  box-shadow: none;
}

.file-helper {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Featured toggle buttons */
fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

legend {
  font-weight: 700;
  margin-bottom: 4px;
}

.helper-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.toggle-group {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.toggle-option {
  position: relative;
  flex: 1;
}

.toggle-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid var(--ring);
  background: #f3f4f6;
  color: var(--ink);
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.toggle-label.no {
  background: #f3f4f6; /* light neutral */
  color: #374151;      /* slate gray */
  border-color: #d1d5db;
}

.toggle-label.yes {
  background: #e0f2fe;
  color: #2563eb;
  border-color: rgba(182,59,38,0.25);
}

.toggle-option input[type="radio"]:checked + .toggle-label.no {
  background: #9ca3af; /* darker gray */
  color: #fff;
  border-color: #6b7280;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.25);
}

.toggle-option input[type="radio"]:checked + .toggle-label.yes {
  background: #2563eb; /* solid blue */
  color: #fff;
  border-color: #1e40af;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Example photo card */
.example-photo-card {
  margin-top: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px dashed var(--ring);
  background: #f9fafb;
  font-size: 0.85rem;
  color: var(--muted);
}

.example-photo-card strong {
  color: var(--ink);
}

.example-photo {
  margin-top: 8px;
  max-width: 180px;
  border-radius: 12px;
  cursor: zoom-in;
  display: block;
}

/* Lightbox */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox-backdrop.visible {
  display: flex;
}

.lightbox-backdrop img {
  width: min(700px, 90vw);   /* target ~700px on desktop, but respect viewport */
  height: auto;
  max-height: 90vh;          /* keep it inside the screen vertically */
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

/* Simple progress bar */
.progress-bar-wrap {
  margin-top: 10px;
  display: none;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--salmon);
  animation: ks-progress 1.5s infinite;
}

@keyframes ks-progress {
  0%   { width: 5%; transform: translateX(-20%); }
  50%  { width: 65%; transform: translateX(20%); }
  100% { width: 30%; transform: translateX(120%); }
}

/* --- Fancy file upload card --- */

.file-upload-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-upload-card {
  border-radius: 18px;
  border: 1px dashed var(--ring);
  background: #f9fafb;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.file-upload-card:hover {
  background: #eef2ff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.file-upload-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.file-upload-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-upload-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.file-upload-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Hide the ugly native input but keep it accessible */
#files {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Summary text under the card */
.file-summary {
  font-size: 0.85rem;
  color: var(--muted);
}
/* --- Modern drag & drop upload --- */

.dropzone {
  border-radius: 18px;
  border: 2px dashed rgba(148, 163, 184, 0.9);
  background: linear-gradient(135deg, #f9fafb, #eef2ff);
  padding: 18px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.dropzone:hover {
  background: linear-gradient(135deg, #edf2ff, #e0f2fe);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dropzone.dragover {
  background: linear-gradient(135deg, #dbeafe, #fee2e2);
  border-color: var(--salmon);
  box-shadow: 0 8px 24px rgba(182, 59, 38, 0.35);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.11);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropzone-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.dropzone-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.files-summary {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 6px;
}

.files-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 400px;        /* limit bubble row width */
}

.file-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #1e3a8a;
  animation: fadeIn 0.2s ease-out;
  width: 100%;
  box-sizing: border-box;
}

.file-bubble .file-name {
  flex: 1;                   /* take up remaining space */
  overflow: hidden;
  text-overflow: ellipsis;   /* add ... */
  white-space: nowrap;       /* keep on one line */
}

/* Hide native input but keep it accessible */
#files {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* --- Salmon rating --- */

.rating-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rating-stars {
  display: flex;
  gap: 8px;
}

.rating-stars button {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  border-radius: 999px;
  transition:
    transform 0.08s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
}

.star-icon {
  width: 34px;   /* tweak to taste */
  height: 34px;
  display: block;
  filter: grayscale(60%) opacity(0.7);
  transition: filter 0.12s ease;
}

.rating-stars button:hover .star-icon {
  filter: grayscale(20%) opacity(0.9);
}

.rating-stars button.active {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.rating-stars button.active .star-icon {
  filter: none;
}

.rating-hint {
  font-size: 0.85rem;
  color: #6b7280;
}

.rating-container {
  background: #f9fafb;          /* very light gray */
  border: 1px solid #e5e7eb;    /* soft border */
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
}

.rating-container label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}


/* Rich Text Editor for input feild */
.editor-container {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 18px;
}

.editor-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.editor-toolbar button {
  background: #fff;
  border: 1px solid #d1d5db;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.editor-toolbar button:hover {
  background: #f3f4f6;
}

.rich-editor {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  min-height: 100px;
  padding: 8px;
  line-height: 1.5;
}
.rich-editor {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  min-height: 100px;
  padding: 8px;
  line-height: 1.5;
}

/* Placeholder style when editor is empty */
.rich-editor.is-empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}

/* File bubble list */
.files-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #1e3a8a;
  animation: fadeIn 0.2s ease-out;
}

.file-bubble .check {
  color: #16a34a; /* green check */
  font-weight: bold;
  font-size: 1.1rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
