/* /css/PasteSudokuPuzzle.css
// ==========================================================
// Sudoku Paradise — Paste Your Puzzle Landing Page
// ========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #243b3e;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.paste-page-header {
  display: flex;
  justify-content: center;
  padding: 1.1rem 5rem 0.4rem;
}

.paste-brand {
  color: #0b6870;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.paste-page-main {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
}

.paste-hero {
  max-width: 760px;
  margin: 0 auto 1.35rem;
  text-align: center;
}

.paste-eyebrow {
  margin: 0 0 0.4rem;
  color: #0b6870;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.paste-hero h1 {
  margin: 0;
  color: #174f55;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.08;
}

.paste-lead {
  max-width: 700px;
  margin: 1rem auto 0;
  font-size: 1.08rem;
  line-height: 1.65;
}

.paste-workbench,
.paste-explanation,
.paste-features {
  margin: 1.25rem auto;
  padding: clamp(1.1rem, 4vw, 1.75rem);
  border: 1px solid rgba(11, 104, 112, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(20, 55, 60, 0.1);
}

.paste-workbench {
  max-width: 760px;
}

.paste-workbench h2,
.paste-explanation h2,
.paste-features h2 {
  margin: 0 0 0.85rem;
  color: #0b6870;
  font-size: 1.35rem;
}

.paste-workbench label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 750;
}

.image-import h3,
.confirmation-panel h3 {
  margin: 0 0 0.45rem;
  color: #174f55;
  font-size: 1.05rem;
}

.puzzle-image-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 10rem;
  padding: 1.25rem;
  border: 2px dashed rgba(11, 104, 112, 0.48);
  border-radius: 11px;
  background: rgba(237, 250, 248, 0.68);
  color: #31585c;
  cursor: pointer;
  text-align: center;
}

.puzzle-image-drop-zone:hover,
.puzzle-image-drop-zone:focus-visible,
.puzzle-image-drop-zone.is-dragging {
  border-color: #0b6870;
  background: rgba(217, 244, 240, 0.92);
  outline: none;
}

.image-drop-icon {
  color: #0b6870;
  font-size: 2rem;
  line-height: 1;
}

#chooseImageButton,
#removeImageButton {
  appearance: none;
  margin: 0;
  border: 1px solid rgba(11, 104, 112, 0.4);
  border-radius: 8px;
  background: #ffffff;
  color: #0b6870;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

#chooseImageButton {
  min-height: 40px;
  padding: 0.55rem 0.9rem;
}

#removeImageButton {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
}

.image-reference {
  margin-top: 0.85rem;
  padding: 0.8rem;
  border: 1px solid rgba(11, 104, 112, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.image-reference-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

#puzzleImagePreview {
  display: block;
  max-width: 100%;
  max-height: 32rem;
  margin: 0 auto;
  border: 1px solid rgba(20, 55, 60, 0.22);
  background: #ffffff;
  object-fit: contain;
}

.import-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #547174;
  font-size: 0.78rem;
  font-weight: 800;
}

.import-divider::before,
.import-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(11, 104, 112, 0.22);
}

#puzzleString {
  display: block;
  width: 100%;
  min-height: 8.5rem;
  resize: vertical;
  padding: 0.85rem;
  border: 2px solid rgba(11, 104, 112, 0.35);
  border-radius: 9px;
  background: #ffffff;
  color: #162f32;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

#puzzleString:focus {
  border-color: #0b6870;
  outline: 3px solid rgba(11, 104, 112, 0.16);
}

#puzzleString.is-invalid {
  border-color: #a12c2c;
  outline-color: rgba(161, 44, 44, 0.14);
}

.paste-instructions {
  margin: 0.65rem 0 0;
  color: #405d60;
  font-size: 0.92rem;
  line-height: 1.5;
}

.paste-counter {
  margin-top: 0.45rem;
  color: #547174;
  font-size: 0.85rem;
  text-align: right;
}

.paste-status {
  min-height: 1.5rem;
  margin: 0.55rem 0;
  color: #8c2424;
  font-weight: 700;
}

.confirmation-panel {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(11, 104, 112, 0.2);
}

.confirmation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.confirmation-header p {
  margin: 0;
  color: #486467;
  font-size: 0.9rem;
}

.confirmation-givens {
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(11, 104, 112, 0.1);
  color: #0b6870;
  font-size: 0.82rem;
  font-weight: 800;
}

.confirmation-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  width: min(100%, 31.5rem);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 3px solid #34494c;
  background: #ffffff;
}

.confirmation-cell {
  appearance: none;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid #aeb9ba;
  border-bottom: 1px solid #aeb9ba;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  color: #132f33;
  font-family: inherit;
  font-size: clamp(1rem, 4.2vw, 1.55rem);
  font-weight: 650;
  text-align: center;
}

.confirmation-cell:nth-child(9n) {
  border-right: 0;
}

.confirmation-cell:nth-child(n + 73) {
  border-bottom: 0;
}

.confirmation-cell:nth-child(9n + 3),
.confirmation-cell:nth-child(9n + 6) {
  border-right: 2px solid #526467;
}

.confirmation-cell:nth-child(n + 19):nth-child(-n + 27),
.confirmation-cell:nth-child(n + 46):nth-child(-n + 54) {
  border-bottom: 2px solid #526467;
}

.confirmation-cell:focus {
  position: relative;
  z-index: 2;
  background: #e1f5f2;
  outline: 3px solid #0b6870;
  outline-offset: -3px;
}

.paste-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.paste-actions button {
  appearance: none;
  min-height: 44px;
  margin: 0;
  padding: 0.7rem 1rem;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

#openPuzzleButton {
  border: 1px solid #0b6870;
  background: #0b6870;
  color: #ffffff;
}

#openPuzzleButton:hover,
#openPuzzleButton:focus-visible {
  background: #084f56;
}

#clearPuzzleButton {
  border: 1px solid rgba(11, 104, 112, 0.38);
  background: #ffffff;
  color: #0b6870;
}

.paste-explanation {
  max-width: 760px;
}

.paste-explanation ol {
  padding-left: 1.4rem;
  line-height: 1.7;
}

.paste-explanation p {
  line-height: 1.65;
}

.paste-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.paste-feature-grid article {
  padding: 1rem;
  border: 1px solid rgba(11, 104, 112, 0.17);
  border-radius: 10px;
  background: rgba(237, 250, 248, 0.7);
}

.paste-feature-grid h3 {
  margin: 0 0 0.45rem;
  color: #174f55;
  font-size: 1rem;
}

.paste-feature-grid p {
  margin: 0;
  line-height: 1.55;
}

.paste-page-footer {
  padding: 1rem;
  color: #486467;
  font-size: 0.9rem;
  text-align: center;
}

.paste-page-footer a {
  color: #0b6870;
  font-weight: 700;
}

@media (max-width: 680px) {
  .paste-page-header {
    padding-top: 3.6rem;
  }

  .paste-feature-grid {
    grid-template-columns: 1fr;
  }

  .paste-actions button {
    width: 100%;
  }

  .confirmation-header {
    flex-direction: column;
  }

  .confirmation-cell {
    font-size: clamp(0.95rem, 6vw, 1.35rem);
  }
}
