/* ---------------------------------------------------------
   GLOBAL BASE
--------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #ffffff;
  color: #333333;
}

/* ---------------------------------------------------------
   HEADER
--------------------------------------------------------- */

.lara-header {
  background-color: #C25A3B;
  color: #ffffff;
  padding: 24px 20px;
  text-align: center;
  font-size: 42px !important;
  font-weight: 700;
}

/* ---------------------------------------------------------
   NAV BAR
--------------------------------------------------------- */

.lara-nav {
  background-color: #f1e3de;
  padding: 12px 0;
  text-align: center;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.nav-btn {
  color: #C25A3B;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
}

.nav-btn:hover {
  background-color: rgba(0,0,0,0.06);
}

/* ---------------------------------------------------------
   MAIN CONTENT
--------------------------------------------------------- */

.content-container {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 20px 40px;
}

.page-title {
  margin-top: 0;
  color: #C25A3B;
  font-size: 26px;
  font-weight: 700;
}

.preferences-subheading {
  margin-top: 0;
  margin-bottom: 12px;
  color: #C25A3B;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

/* ---------------------------------------------------------
   HOME PAGE (FLUSH‑LEFT)
--------------------------------------------------------- */

.home-container {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 20px 40px;
  text-align: left;
}

.home-container h1 {
  margin-top: 0;
  color: #C25A3B;
  font-size: 32px;
  font-weight: 700;
}

.home-intro {
  font-size: 18px;
  line-height: 1.5;
  max-width: 600px;
  margin-bottom: 40px;
}

.home-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.home-btn {
  background-color: #C25A3B;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  width: auto;
  text-align: left;
  line-height: 1.2;
}

/* ---------------------------------------------------------
   IMPORTANCE KEY
--------------------------------------------------------- */

.importance-key {
  margin-bottom: 24px;
  font-size: 16px;
  font-weight: 700;
  color: #333333;
}

.preferences-instruction {
  color: #000000;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 10px;
}

.importance-key-heading {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

/* ---------------------------------------------------------
   TABLE (My Preferences + shared look)
--------------------------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border: 1px solid #ddd;
  padding: 10px;
  vertical-align: middle;
}

.table-header th {
  background-color: #f1e3de;
  color: #C25A3B;
  text-align: left;
  font-weight: 700;
  font-size: 130%;
}

.pref-row:nth-child(odd) {
  background-color: #ffffff;
}

.pref-row:nth-child(even) {
  background-color: #F7E7E3;
}

/* Center column headers */
.centered-th {
  text-align: center !important;
}

/* ---------------------------------------------------------
   INPUTS
--------------------------------------------------------- */

.text-input,
.dropdown {
  width: 100%;
  padding: 6px;
  border: 1px solid #C25A3B;
  border-radius: 3px;
  font-size: 16px;
  background-color: #ffffff;
  color: #333333;
  box-sizing: border-box;
} 

/* Force inputs to ignore inherited bold/black text */
.text-input {
  font-weight: normal !important;
}

/* Placeholder colour (brown) */
input::placeholder,
.text-input::placeholder {
  color: #C25A3B !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
input::-webkit-input-placeholder,
.text-input::-webkit-input-placeholder {
  color: #C25A3B !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
input:-ms-input-placeholder,
.text-input:-ms-input-placeholder {
  color: #C25A3B !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
input::-ms-input-placeholder,
.text-input::-ms-input-placeholder {
  color: #C25A3B !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

/* Dropdown text colour */
.dropdown {
  appearance: none;
  color: #C25A3B;
}

/* ---------------------------------------------------------
   TICKBOXES
--------------------------------------------------------- */

.tickbox {
  width: 45px;
  height: 45px;
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  border: 2px solid #C25A3B;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.tickbox:checked {
  background-color: #C25A3B;
  border-color: #C25A3B;
}

.tickbox:checked::after {
  content: "✓";
  color: #ffffff;
  font-size: 32px;
  font-weight: bold;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tickbox-cell {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

#preferencesTable td:nth-child(1) {
  font-size: 14px;
}

/* Preferences table columns: Factor 31% / Preference 39% / Importance 19% */
#preferencesTable th:nth-child(1),
#preferencesTable td:nth-child(1) {
  width: 31%;
}

#preferencesTable th:nth-child(2),
#preferencesTable td:nth-child(2) {
  width: 39%;
}

#preferencesTable td:nth-child(2) {
  text-align: center;
  vertical-align: middle;
}

#preferencesTable td:nth-child(2) input[type="checkbox"] {
  margin: 0 auto;
  display: block;
}

#preferencesTable th:nth-child(3),
#preferencesTable td:nth-child(3) {
  width: 19%;
}

.importance-cell {
  padding-left: 16px;
  padding-right: 16px;
}

.dropdown {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color: #C25A3B;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 6'><polygon points='0,0 8,0 4,6' fill='%23C25A3B'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 8px 6px;
  padding-right: 30px;
}

.dropdown option[hidden] {
  display: none;
}

/* ---------------------------------------------------------
   SLIDERS — MATCH MY PREFERENCES
--------------------------------------------------------- */

.slider-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Force both slider types to match My Preferences */
.slider,
.score-slider {
  width: 80% !important;      /* SHRINK to match My Preferences */
  margin: 0 auto !important;  /* Center slider */
  display: block;
  height: 6px;
  background: #C25A3B;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.08);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Track */
.slider::-webkit-slider-runnable-track,
.score-slider::-webkit-slider-runnable-track {
  height: 4px;
  background: #C25A3B;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Thumb */
.slider::-webkit-slider-thumb,
.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;                 /* MATCH My Preferences */
  height: 18px;                /* MATCH My Preferences */
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #C25A3B;
  cursor: pointer;
  margin-top: -7px;            /* Align with smaller thumb */
}

.slider::-moz-range-track,
.score-slider::-moz-range-track {
  height: 4px;
  background: #C25A3B;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.08);
}

.slider::-moz-range-thumb,
.score-slider::-moz-range-thumb {
  width: 18px;                 /* MATCH My Preferences */
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #C25A3B;
  cursor: pointer;
}

/* Slider value */
.slider-value {
  font-size: 18px !important;  /* Match My Preferences */
  color: #C25A3B;
  margin-top: 10px;
  text-align: center;
  font-weight: bold;
}

/* ---------------------------------------------------------
   BOTTOM BUTTONS
--------------------------------------------------------- */

.bottom-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap !important;
  align-items: center;
  width: 100%;
}

.bottom-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #C25A3B;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  text-align: center;
  text-decoration: none;
}

/* ---------------------------------------------------------
   SUMMARY + ASSESS PROPERTY ROW COLOURS
--------------------------------------------------------- */

.summary-row:nth-child(odd),
.assess-row:nth-child(odd) {
  background-color: #f9f4f2;
}

.summary-row:nth-child(even),
.assess-row:nth-child(even) {
  background-color: #ffffff;
}

/* ---------------------------------------------------------
   NUMERIC COLUMNS (Assess Property)
--------------------------------------------------------- */

.importance-cell {
  text-align: center;
}

.total-cell {
  text-align: right;
  color: #C25A3B;
}

/* ---------------------------------------------------------
   DELETE MODAL / INFO MODAL
--------------------------------------------------------- */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;              /* hidden by default */
  justify-content: center;    /* center horizontally */
  align-items: center;        /* center vertically */
  z-index: 9999;              /* ensure above all content */
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
  width: min(280px, calc(100vw - 32px));
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2); /* match preferences modal */
}

.modal-content p {
  color: #C25A3B;
  font-weight: 700;
  margin: 0 0 10px 0;
}

.modal-btn {
  padding: 8px 16px;
  margin: 10px 6px 0 6px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
}

.modal-btn.yes,
.modal-btn.ok {
  background: #C25A3B;
  color: #ffffff;
}

.modal-btn.no {
  background: #ddd;
  color: #333;
}


/* ---------------------------------------------------------
   SUMMARY TABLE
--------------------------------------------------------- */

#summaryTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#summaryTable th,
#summaryTable td {
  border: 1px solid #ddd;
  padding: 10px;
}

/* Table headings */
#summaryTable th {
  background-color: #f1e3de;
  color: #C25A3B;
  text-align: left;
  font-weight: 700;
}

/* Centre columns 2, 3, 4 (Total Score, % Match, Delete) */
#summaryTable th:nth-child(2),
#summaryTable th:nth-child(3),
#summaryTable th:nth-child(4),
#summaryTable td:nth-child(2),
#summaryTable td:nth-child(3),
#summaryTable td:nth-child(4) {
  text-align: center;
}

/* Brown delete icon (matches your design) */
.delete-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #C25A3B;
  color: #C25A3B;
  cursor: pointer;
  font-size: 16px;
}

/* Hover effect */
.delete-icon:hover {
  background-color: #C25A3B;
  color: #ffffff;
}

/* ---------------------------------------------------------
   ASSESS PROPERTY TABLE — centre columns 2, 3, 4
--------------------------------------------------------- */

#assessmentTable th:nth-child(2),
#assessmentTable th:nth-child(3),
#assessmentTable th:nth-child(4),
#assessmentTable td:nth-child(2),
#assessmentTable td:nth-child(3),
#assessmentTable td:nth-child(4) {
  text-align: center;
}

#assessmentTable,
#preferencesTable,
#summaryTable {
  width: 100%;
  table-layout: fixed;
}

#assessmentTable th,
#assessmentTable td,
#preferencesTable th,
#preferencesTable td,
#summaryTable th,
#summaryTable td {
  padding: 6px 4px;
  word-wrap: break-word;
  white-space: normal;
}

#assessmentTable th:nth-child(1),
#assessmentTable td:nth-child(1),
#summaryTable th:nth-child(1),
#summaryTable td:nth-child(1) {
  width: 55%;
} 

#preferencesTable th:nth-child(2),
#preferencesTable td:nth-child(2) {
  width: 30%;
  padding-right: 28px;
}

#assessmentTable th:nth-child(1),
#assessmentTable td:nth-child(1) {
  width: 31%;
}

#assessmentTable th:nth-child(2),
#assessmentTable td:nth-child(2) {
  width: 39%;
}

#assessmentTable th:nth-child(3),
#assessmentTable td:nth-child(3) {
  width: 19%;
}

#assessmentTable th:nth-child(4),
#assessmentTable td:nth-child(4) {
  width: 11%;
}

#summaryTable th:nth-child(1),
#summaryTable td:nth-child(1) {
  width: 55%;
}
#summaryTable th:nth-child(2),
#summaryTable td:nth-child(2),
#summaryTable th:nth-child(3),
#summaryTable td:nth-child(3),
#summaryTable th:nth-child(4),
#summaryTable td:nth-child(4) {
  width: 20%;
}

/* Assessment page: score-slider sizing and layout (80% width, centered) */
#assessmentTable .score-slider {
  width: 80%;
  margin: 0 auto;
  display: block;
}

/* Preference page sliders use the same sizing and behavior */
#preferencesTable .slider {
  width: 80%;
  margin: 0 auto;
  display: block;
}

/* Width variants used by JS when table overflows */
.slider-width-80 { width: 80% !important; }
.slider-width-75 { width: 75% !important; }
.slider-width-70 { width: 70% !important; }

/* Give the score column some horizontal padding so slider has left/right spacing */
#assessmentTable td:nth-child(2) {
  padding-left: 16px;
  padding-right: 16px;
}

/* Preferences slider column padding */
#preferencesTable td:nth-child(2) {
  padding-left: 16px;
  padding-right: 16px;
}

/* Move and bold the score value specifically for assessment rows */
#assessmentTable .slider-wrapper .slider-value {
  margin-top: 10px;
  font-weight: 700;
}

/* Preferences slider value styling (matches assessment) */
#preferencesTable .slider-wrapper .slider-value {
  margin-top: 10px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .nav-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-buttons .nav-btn {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }

  .lara-btn-small,
  .bottom-btn,
  .home-btn {
    width: 100%;
    max-width: 100%;
  }

  .bottom-buttons {
    flex-wrap: wrap;
  }
}

/* Placeholder override (strong) */
input::placeholder,
.text-input::placeholder {
  color: #C25A3B !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

/* ---------------------------------------------------------
   UTILITY
--------------------------------------------------------- */

.lara-hidden {
  display: none;
}

/* ------------------------------
   LARA Footer
------------------------------ */
.lara-footer {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  text-align: center;
  color: #C25A3B;
  padding: 20px 0;
  margin-top: 40px;
  border-top: 1px solid #e8d6d0;
  background-color: #f9f4f2;
}

/* ------------------------------
   Clickable property address links
------------------------------ */
.summary-address-link {
  color: #C25A3B;
  text-decoration: underline;
  font-weight: 500;
}

.summary-address-link:hover {
  opacity: 0.8;
}
/* ------------------------------
   Sticky Importance Key
------------------------------ */
.importance-key {
  position: sticky;
  top: 0;
  background: #ffffff;      /* white background */
  padding: 10px 0;
  z-index: 10;
  border-bottom: 2px solid #C25A3B;  /* brown border */
}
.importance-key.scrolled {
  background: #C25A3B;
  color: #ffffff;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 6px;
}
/* Ensure modals always appear above sticky key */
.lara-modal {
  z-index: 9999 !important;
}
.importance-key.hidden {
  display: none;
}

/* Brown rubbish bin icon */
.delete-icon {
  color: #C25A3B !important;
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .modal-content {
    font-size: 15px;
  }
  .modal-btn {
    font-size: 14px;
  }
}

/* Placeholder override (strong) */
input::placeholder,
.text-input::placeholder {
  color: #C25A3B !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

/* ---------------------------------------------------------
   FORCE OVERRIDES: pref-checkbox size + placeholder style
   (Placed at bottom to ensure these rules win)
--------------------------------------------------------- */
.pref-checkbox {
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 3px solid #C25A3B !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  cursor: pointer !important;
  position: relative !important;
  font-size: 32px !important;
  line-height: 1 !important;
  color: #ffffff !important;
}

.pref-checkbox:checked {
  background-color: #C25A3B !important;
  color: #ffffff !important;
}

.pref-checkbox::after {
  /* show checkmark only when checked; content set on :checked */
  content: '' ;
  display: inline-block;
}

.pref-checkbox:checked::after {
  content: "✓";
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

/* Placeholder override (strong) */
input::placeholder,
.text-input::placeholder {
  color: #C25A3B !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}
