
/* Modern Survey Stylesheet */
:root {
  --primary-color: #1190FF;
  --hover-color: #BFE8FF;

  --secondary-color: #BBE1FF;
  --bg-color: #f8fafc;
  --title-bg: #F0FAFF;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius: 1rem;

  --white: #FFF;
  --question-color: #1152FF;
}

* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

h1 { font-size: 2.00rem; margin: 0.15rem 0; padding: 0; line-height: 1; }
h2 { font-size: 1.80rem; margin: 0.15rem 0; padding: 0; line-height: 1; font-weight: normal; }
h3 { font-size: 1.60rem; margin: 0.15rem 0; padding: 0; line-height: 1; font-weight: normal; }
h4 { font-size: 1.40rem; margin: 0.15rem 0; padding: 0; line-height: 1; font-weight: normal; }
h5 { font-size: 1.20rem; margin: 0.15rem 0; padding: 0; line-height: 1; font-weight: normal; }
h6 { font-size: 1.00rem; margin: 0.15rem 0; padding: 0; line-height: 1; font-weight: normal; }

hr {
  background: var(--secondary-color, #BBE1FF);
  height: 3px;
  border: 0;
}
hr.spacer {
  margin: 1rem 0;
}

span.zing {
  font-weight: bold;
  color: #F00;
}

label {
  display: block;
  font-weight: 600;
  margin: 0;
  font-size: 1.00rem;
}

/* Inputs & Textareas */
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.text-center {
  text-align: center;
  padding: 60px 40px; /* A bit more breathing room for the final message */
}

.thank-you-state {
  animation: fadeIn 1.5s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.common-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  transition: transform 0.2s ease;
}

.the-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid #555;
  border-left: 1px solid #555;
}
.the-grid > div {
  border-bottom: 1px solid #555;
  border-right: 1px solid #555;
  padding: 1rem;
}

.the-card {
  position: relative;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem 0.50rem 0.50rem 0.50rem;
  padding: 3rem 1rem 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.the-title {
  position: absolute;
  top: 0; /* Pulls it halfway above the top border */
  left: 0;
  background: var(--primary-color);
  color: var(--white);
  padding: 6px 18px;
  border-radius: 0.25rem 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.the-content h4 {
  margin-bottom: 1rem;
}

.the-menu {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  margin: 1rem 0;
}

/* spreadsheet */

.spreadsheet-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    border: 1px solid #CCC;
    background: #FFF;
}

/* Hide native scrollbars completely so Chrome and Firefox don't render double bars */
.table-scroll-container {
    width: 100%;
    overflow-x: scroll;
    scrollbar-width: none; /* Firefox */
}
.table-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.spreadsheet-grid {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.spreadsheet-grid th,
.spreadsheet-grid td {
    padding: 6px 10px;
    border: 1px solid #ddd;
    font-family: sans-serif;
    font-size: 13px;
    text-align: left;
}

.spreadsheet-grid td {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

/* --- THE OLD SCHOOL SCROLLBAR ENGINE --- */
.custom-scrollbar-track {
    width: 100%;
    height: 20px; /* Adjust this to make it as chunkily massive as you want! */
    background-color: #f1f1f1;
    border-top: 1px solid #ccc;
    position: relative;
    user-select: none;
}

.custom-scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #888888; /* Solid grey, no hover fade tricks */
    cursor: pointer;
}


/* Header and Row Number Styling */
th, .row-num {
    background-color: #f1f1f1;
    color: #666;
    font-weight: 600;
    text-align: center;
    font-size: 13px;
    user-select: none;
    white-space: nowrap;
}

th {
    padding: 8px;
    border-bottom: 2px solid #ccc;
    border-right: 1px solid #ccc;
}

td {
    padding: 8px;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #333;

    /* Hide excess content with ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.row-num {
    border-right: 2px solid #ccc;
    cursor: default;
}

/* Interactive States */
td:not(.row-num):hover {
    background-color: #f5fafd;
}

td.selected {
    outline: 2px solid #1a73e8;
    outline-offset: -2px;
    background-color: #e8f0fe !important;
}

/* Inspector Panel */
.inspector {
  margin-top: 15px;
  padding: 12px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  min-height: 45px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* alert boxes */
.alert {
  position: relative;
  padding: 1rem 2rem 1rem 1rem;
  background-color: #DDDDDD;
  color: #333;
  opacity: 1;
  transition: opacity 0.6s;
  margin-bottom: 1rem;
  border-left: 3px solid #777;
  border-radius: 0 0.50rem 0.50rem 0;
}

.alert.error   { background-color: #FFE9E9; border-color: #F44336; }
.alert.success { background-color: #C5FFEA; border-color: #04AA6D; }
.alert.info    { background-color: #DEF0FF; border-color: #2196F3; }
.alert.warning { background-color: #FFF6DB; border-color: #FF9800; }

.alert.error   h4 { color: #F44336; }
.alert.success h4 { color: #04AA6D; }
.alert.info    h4 { color: #2196F3; }
.alert.warning h4 { color: #FF9800; }

.closebtn {
  position: absolute;
  top: 0.60rem;
  right: 0.60rem;
  color: #333;
  font-weight: bold;
  font-size: 2rem;
  line-height: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

.closebtn:hover {
  color: #F00;
}

/* buttons */


.button {
  display: block;
  margin: 0;
  border: 0;
  padding: 0 0.50rem 0.10rem 0.50rem;
  font-family: sans-serif;
  font-weight: 600;
  color: #FFF;
  text-decoration: none;
  text-align: center;
  font-size: 1rem;
  line-height: 2.00rem;

  background-image: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  background-size: 200% auto; /* Needed for smooth transition */

  border-radius: 0.25rem;

  transition: all 0.4s ease;
}

.button:hover {
  background-position: right center;
  cursor: pointer;
}

