/* create.css */

/* Page-level layout for the pin creation wizard. */
body.create-page {
  margin: 0;
  min-height: 100vh;
  background: #eef4f0;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  color: #1f2b24;
}

/* Central column that houses the create form card. */
#createMain {
  flex: 1;
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 2.5em 1.5em 3em;
  box-sizing: border-box;
}

/* Raised card containing the entire creation form. */
.form-card {
  background: #fff;
  border-radius: 22px;
  padding: 2.5em;
  box-shadow: 0 25px 60px rgba(26, 61, 45, 0.15);
}

/* Primary heading at the top of the form card. */
.form-header h1 {
  margin: 0 0 0.2em;
  color: #1f5b41;
  font-size: 2rem;
}

/* Supporting intro text explaining the flow. */
.form-header p {
  margin: 0 0 1.8em;
  color: #556b60;
  line-height: 1.5;
}

/* Stack each logical form step vertically. */
#addPinForm {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

/* Split form content into columns on larger screens. */
.form-grid {
  display: flex;
  gap: 1.5em;
  flex-wrap: wrap;
}

/* One column of inputs in the grid layout. */
.form-column {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}

/* Panel that encloses the map + coordinate helper text. */
.location-panel {
  background: #f5faf7;
  border: 1px solid #dfe8e2;
  border-radius: 16px;
  padding: 1.5em;
}

/* Frame the Leaflet map preview with rounded corners. */
.location-map-wrapper {
  width: 100%;
  height: 240px;
  border-radius: 14px;
  overflow: hidden;
  background: #dfe8e2;
  position: relative;
}

/* Ensure the map fills its wrapper. */
#locationMap {
  width: 100%;
  height: 100%;
}

/* Helper text under the map instructions. */
.map-helper {
  margin: 0.8em 0 1em;
}

/* Uppercase section label used in utility panels. */
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6f8279;
  margin: 0 0 0.8em;
  font-size: 0.85em;
}

/* Stack a label + input field in vertical order. */
.form-group {
  display: flex;
  flex-direction: column;
}

/* Row for grouping related fields side by side. */
.form-row {
  display: flex;
  gap: 1em;
}

/* Let grouped inputs share the available width evenly. */
.form-row .form-group {
  flex: 1;
}

/* Global label styling for the create form. */
label {
  font-weight: 600;
  color: #305043;
  margin-bottom: 0.4em;
}

/* Base styles for all create form inputs. */
input,
select,
textarea {
  border: 1px solid #c7d6cf;
  border-radius: 12px;
  padding: 0.85em;
  font-size: 1em;
  box-sizing: border-box;
  font-family: inherit;
  background: #fff;
}

/* Multi-line description/notes fields. */
textarea {
  min-height: 170px;
  resize: vertical;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Taller description area in the details panel. */
.details-panel textarea {
  min-height: 320px;
}

/* Small helper copy beneath an input. */
.helper-text {
  margin-top: 0.6em;
  font-size: 0.9em;
  color: #6d7e75;
}

/* Heading within each major section such as Types or Details. */
.section-heading h2 {
  margin: 0;
  color: #264f3e;
  font-size: 1.2rem;
}

/* Text describing what the section is about. */
.section-heading p {
  margin: 0.4em 0 0;
  color: #556b60;
  font-size: 0.95em;
  line-height: 1.4;
}

/* Gap between type pill rows/columns. */
.type-pills-block {
  gap: 0.8em;
}

/* Container around the entire types picker. */
.pill-category-container {
  display: flex;
  flex-direction: column;
  gap: 1em;
  border: 1px solid #d9e3de;
  border-radius: 16px;
  padding: 1.2em;
  background: #f9fbfa;
}

/* Stack a category label with its pill list. */
.type-category-block {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

/* Label above each type group (People, Places, etc.). */
.type-category-label {
  margin: 0;
  font-size: 0.85em;
  letter-spacing: 0.05em;
  color: #6f8279;
  text-transform: uppercase;
}

/* Layout for the pill buttons in a category. */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

/* Reset pill buttons so they behave like plain pills. */
.pill-button {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

/* Base pill styling for each type option. */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4em 1em;
  border-radius: 999px;
  background: #e8f3ed;
  color: #285441;
  font-size: 0.95em;
  border: none;
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border 0.15s ease;
}

/* Colorway for People category types. */
.pill.people {
  background: #e1f3e6;
  color: #1f5d34;
}

/* Colorway for Places category types. */
.pill.places {
  background: #e3eefc;
  color: #1f4a77;
}

/* Colorway for Experiences category types. */
.pill.experiences {
  background: #fdf4d7;
  color: #6a530f;
}

/* Allow type pills to show selection borders. */
.selectable-pill {
  border: 2px solid transparent;
}

/* Slight lift when hovering a type pill. */
.selectable-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(18, 58, 45, 0.15);
}

/* Selected state shadow/border for type pills. */
.selectable-pill.selected {
  box-shadow: 0 8px 24px rgba(16, 62, 46, 0.2);
  border-color: #2a6a4f;
}

/* Stronger border for the chosen primary type. */
.primary-select-pill.selected {
  border-color: #1f503a;
}

/* Placeholder copy shown while types load. */
.loading-copy {
  margin: 0;
  color: #6b7f75;
}

/* Row aligning the submit button to the right. */
.action-row {
  display: flex;
  justify-content: flex-end;
}

/* Primary “Create pin” button styling. */
#createPinBtn {
  background: #2a6a4f;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.95em 2.8em;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

/* Hover state for the create button. */
#createPinBtn:hover {
  background: #1e4e39;
}

/* Stack the form sections on tablets and smaller. */
@media (max-width: 768px) {
  .form-card {
    padding: 1.8em;
  }

  .form-grid {
    flex-direction: column;
  }

  .form-row {
    flex-direction: column;
  }

  .action-row {
    justify-content: stretch;
  }

  #createPinBtn {
    width: 100%;
  }

  .location-map-wrapper {
    height: 200px;
  }
}
