/* myaccount.css */

/* Set background and flex layout for the dashboard. */
body.account-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(180deg, #f1f7f0 0%, #e6efe5 100%);
  color: #1f2e2a;
}

/* Horizontal layout that houses the nav and panel area. */
#accountMain {
  flex: 1;
  display: flex;
  gap: 2rem;
  padding: 2.5rem clamp(1.5rem, 4vw, 4rem) 3rem;
  box-sizing: border-box;
}

/* Sticky sidebar containing account navigation buttons. */
.account-nav {
  width: 230px;
  background-color: #ffffff;
  border-radius: 20px;
  padding: 1.5rem 1.2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

/* Button styling for each navigation tab. */
.account-nav-btn {
  border: none;
  background: transparent;
  color: #335347;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

/* Hover color for nav buttons. */
.account-nav-btn:hover {
  background: rgba(42, 106, 79, 0.1);
  color: #1c3d32;
}

/* Active nav button state with accent background. */
.account-nav-btn.active {
  background: #e3f1e8;
  color: #1c4a38;
  font-weight: 600;
  transform: translateX(6px);
  box-shadow: inset 0 0 0 1px rgba(42, 106, 79, 0.2);
}

/* Container for the panels to render in place. */
#accountPanels {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

/* Base styling for each panel card. */
.account-panel {
  background-color: #ffffff;
  border-radius: 24px;
  padding: 2.25rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.1);
  display: none;
}

/* Only show the active panel at a time. */
.account-panel.active {
  display: block;
}

/* Panel heading layout with space for actions. */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Reduced spacing option for tight headers. */
.panel-header.compact {
  margin-bottom: 1rem;
}

/* Eyebrow label reused across sections. */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: #6a7c73;
  margin: 0 0 0.3rem 0;
}

/* Secondary subtitle below panel headers. */
.subtitle {
  margin: 0.3rem 0 0;
  color: #4a5c55;
}

/* Right-aligned block showing member since info. */
.member-since {
  text-align: right;
}

/* Caption above the member since date. */
.member-since .label {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #6a7c73;
}

/* Display the formatted join date. */
.member-since .value {
  margin: 0.3rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1c4a38;
}

/* Inline status/feedback area inside panels. */
.inline-status {
  min-height: 1.25rem;
  font-size: 0.95rem;
  color: #2a6a4f;
  margin-bottom: 0.5rem;
}

/* Hide the inline status when no message is set. */
.inline-status:empty {
  display: none;
}

/* Error text style for inline status. */
.inline-status.error {
  color: #b00020;
}

/* Cards showing pin/review stats. */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Individual stat tile styling. */
.stat-card {
  border: 1px solid #d8e6dd;
  border-radius: 18px;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fdfefe 0%, #f1f7f3 100%);
}

/* Uppercase label above the stat value. */
.stat-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #6a7c73;
  margin: 0;
}

/* Large number display for stat totals. */
.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1c4a38;
  margin: 0.5rem 0;
}

/* Supporting copy beneath the stat number. */
.stat-subtext {
  margin: 0;
  color: #4a5c55;
}

/* Card that houses contributions and favourites lists. */
.activity-card {
  border: 1px solid #dbe6df;
  border-radius: 18px;
  padding: 1.5rem;
  background-color: #f8fbf8;
}

/* Header row above list sections (with filters). */
.activity-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Stack favourites title with its visibility selector underneath. */
.favourites-heading {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 auto;
  margin-right: 1.5rem;
}

/* Stack privacy label, select, and helper text. */
.favourites-visibility-control {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 150px;
  max-width: 220px;
  margin-top: 0.35rem;
}

/* Uppercase helper label above select. */
.favourites-visibility-control label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: #6f8279;
}

/* Rounded select for privacy preference. */
#favouritesVisibilitySelect {
  border: 1px solid #d3e0d6;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  color: #1c4a38;
  background: #fff;
  min-width: 120px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 30, 20, 0.06);
  width: 100%;
}

/* Dim control when disabled during save. */
#favouritesVisibilitySelect:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Container that keeps filter dropdown anchored under the privacy select. */
.favourites-filter-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 180px;
}

/* Favourites filter trigger sits below the dropdown copy. */
.favourites-filter-stack .contribution-filter {
  position: relative;
  margin-left: 0;
}

/* Helper copy under the select. */
.favourites-visibility-helper {
  margin: 0;
  font-size: 0.85rem;
  color: #4d6258;
}

/* Error style for helper text when save fails. */
.favourites-visibility-helper.error {
  color: #b00020;
}

/* Shared styling for dropdown toggle buttons. */
#contributionFilterToggle,
#favouritesFilterToggle {
  padding: 0.65em 1.4em;
  background: #2a6a4f;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 24px rgba(32, 73, 55, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

/* Add lift effect when hovering either filter toggle. */
#contributionFilterToggle:hover,
#favouritesFilterToggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(32, 73, 55, 0.25);
}

/* Dropdown container for contribution/favourites type pickers. */
#contributionFilterDropdown,
#favouritesFilterDropdown {
  position: absolute;
  top: calc(100% + 0.4em);
  right: 0;
  background: #fff;
  border-radius: 18px;
  padding: 1.2em 1.4em 1.4em;
  width: min(420px, 90vw);
  max-height: 460px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 25px 50px rgba(15, 30, 30, 0.25);
  z-index: 50;
  border: 1px solid #dfe8e2;
  font-size: 0.92rem;
}

/* Reveal dropdowns when .show toggles on. */
#contributionFilterDropdown.show,
#favouritesFilterDropdown.show {
  display: block;
}

/* Stack the filter categories for each dropdown. */
#contributionTypeFilters,
#favouritesTypeFilters {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  margin-top: 0.8em;
}

/* Row that holds Select All / Clear actions. */
.filter-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.8em;
  flex-wrap: wrap;
}

/* Secondary pill buttons inside the dropdown actions. */
.filter-actions button {
  flex: 1 1 120px;
  border: 1px solid #dfe8e2;
  background: #f5faf7;
  color: #2a6a4f;
  border-radius: 999px;
  padding: 0.45em 0.8em;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease;
}

/* Hover feedback for dropdown action buttons. */
.filter-actions button:hover {
  background: #e4f1ea;
}

/* A single category block in the dropdown. */
.filter-category {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}

/* Uppercase label text for dropdown categories. */
.filter-category-label {
  margin: 0;
  display: block;
  font-size: 0.85em;
  letter-spacing: 0.05em;
  color: #6f8279;
  text-transform: uppercase;
}

/* Flex row for pills inside each category. */
.filter-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

/* Small helper/empty state text under filter areas. */
.filter-helper {
  margin: 0.2em 0 0;
  font-size: 0.9em;
  color: #5a6a62;
}

/* Country dropdown section appended below type filters. */
.filter-category.country-filter {
  border-top: 1px solid #e6eee9;
  padding-top: 0.8em;
  margin-top: 0.4em;
}

/* Styled select element for choosing a country filter. */
.filter-country-select {
  width: 100%;
  border: 1px solid #dfe8e2;
  border-radius: 999px;
  padding: 0.55em 1em;
  background: #f5faf7;
  color: #1c4a38;
  font-size: 0.95em;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus ring to match HippieTrails green palette. */
.filter-country-select:focus {
  outline: none;
  border-color: #2a6a4f;
  box-shadow: 0 0 0 3px rgba(42, 106, 79, 0.2);
}

/* Dim when countries aren't available or still loading. */
.filter-country-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Base style for account filter pills. */
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4em 1em;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  background: #e8f3ed;
  color: #285441;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, border 0.15s ease;
}

/* People category pill color. */
.filter-pill.people {
  background: #e1f3e6;
  color: #1f5d34;
}

/* Places category pill color. */
.filter-pill.places {
  background: #e3eefc;
  color: #1f4a77;
}

/* Experiences category pill color. */
.filter-pill.experiences {
  background: #fdf4d7;
  color: #6a530f;
}

/* Selected pill shadow/border. */
.filter-pill.selected {
  border-color: #1c4a38;
  box-shadow: 0 6px 14px rgba(20, 50, 40, 0.25);
  transform: translateY(-1px);
}

/* Slight fade when not selected. */
.filter-pill:not(.selected) {
  opacity: 0.85;
}

/* On hover, bring pill forward. */
.filter-pill:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Shared ghost button styling used across the dashboard. */
.ghost-btn {
  border: 1px solid rgba(28, 74, 56, 0.3);
  background: none;
  color: #1c4a38;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Hover background tint for ghost buttons. */
.ghost-btn:hover {
  background-color: rgba(42, 106, 79, 0.08);
}

/* Column layout for the contributions/favourites sections. */
.activity-details {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Container for pins/reviews list groups. */
.list-block {
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e0ebe1;
  padding: 1.25rem;
}

/* Header row above each list (title + actions). */
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Align quick actions (view all, etc.) inside the header. */
.list-heading-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Shared link styling used in list actions. */
.text-link,
.primary-link {
  color: #1e6e53;
  font-weight: 600;
  text-decoration: none;
}

/* Underline action links on hover. */
.text-link:hover,
.primary-link:hover {
  text-decoration: underline;
}

/* Reset + layout for contributions list. */
.items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Each entry inside the contributions list. */
.items-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0 0 1.25rem 0;
  border-bottom: 1px solid #eef3ef;
}

/* Remove bottom border from final list item. */
.items-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Empty row copy (no contributions). */
.items-list li.empty-row {
  border-bottom: none;
  padding: 0;
  color: #5a6a62;
}

/* Title text for each contribution entry. */
.item-name {
  margin: 0;
  font-weight: 600;
  color: #243730;
}

/* Metadata row for contributions (dates, location). */
.item-meta {
  margin: 0.2rem 0 0;
  color: #51645c;
  font-size: 0.9rem;
}

/* Keep titles clickable without adding underlines. */
.item-name-link {
  color: inherit;
  text-decoration: none;
}

/* Underline titles on hover to show they link away. */
.item-name-link:hover {
  text-decoration: underline;
}

/* Ensure info stack fills the card width. */
.item-info {
  width: 100%;
  min-width: 0;
}

/* Pill row inside contributions lists. */
.item-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.6rem 0;
}

/* Generic empty state block inside panels. */
.empty-state {
  border: 1px dashed #c9d8cf;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  background-color: #fdfefe;
}

/* Eyebrow copy inside empty states. */
.empty-eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: #6a7c73;
  margin: 0 0 0.4rem;
}

/* Description inside empty states. */
.empty-copy {
  margin: 0 auto 0.8rem;
  max-width: 460px;
  color: #3d5148;
}

/* Container for the saved pins list. */
.favourites-collection {
  border: 1px solid #dbe6df;
  border-radius: 20px;
  padding: 1.5rem;
  background-color: #f8fbf8;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: 120px;
}

/* Text shown when no favourites exist yet. */
.favourites-empty {
  margin: 0;
  text-align: center;
  color: #5a6f65;
}

/* Link styling for CTA embedded in empty state. */
.favourites-empty a {
  color: #1e6e53;
  font-weight: 600;
  text-decoration: none;
}

/* Underline the CTA link on hover. */
.favourites-empty a:hover {
  text-decoration: underline;
}

/* Individual saved pin card styling. */
.favourite-pin-card {
  background-color: #ffffff;
  border-radius: 18px;
  padding: 1.25rem;
  border: 1px solid #dfeae0;
  box-shadow: 0 12px 30px rgba(16, 37, 28, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Header row for saved pin card (name + country). */
.favourite-pin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.favourite-pin-heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 auto;
}

.favourite-pin-header .share-menu-wrapper {
  margin-left: auto;
}

/* Saved pin title link. */
.favourite-pin-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1b4c37;
  text-decoration: none;
}

/* Underline the saved pin title on hover. */
.favourite-pin-name:hover {
  text-decoration: underline;
}

/* Country label displayed next to saved pin name. */
.favourite-pin-country {
  margin: 0;
  color: #4a5c55;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Type pill row inside saved pin cards. */
.favourite-pin-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Default pill row used by type filters/pills throughout page. */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Compact spacing variation for pill lists. */
.pill-list.compact {
  gap: 0.35rem;
}

/* Generic pill styling for type chips. */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #e8f3ed;
  color: #285441;
  font-size: 0.9rem;
}

/* Bordered primary pill stand-out. */
.pill.primary-pill {
  border: 1px solid #15392a;
  font-weight: 600;
}

/* Neutral pill color when no type data. */
.pill.muted {
  background: #f0f2f1;
  color: #7a8c84;
}

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

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

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

/* Card wrapper for profile/password/delete forms. */
.form-card {
  border: 1px solid #d6e5d9;
  border-radius: 20px;
  padding: 1.8rem;
  background-color: #f9fbf7;
  margin-bottom: 1.5rem;
}

/* Form section heading. */
.form-card-header h3 {
  margin: 0;
  color: #1c4a38;
}

/* Short description beneath each form heading. */
.form-card-header p {
  margin: 0.4rem 0 1rem;
  color: #4a5c55;
}

/* Grid layout to align form fields in columns. */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem 1.5rem;
  align-items: center;
}

/* Labels within the form grid. */
.form-grid label {
  font-size: 0.95rem;
  color: #2b3e36;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Inputs/textarea styling within the grid. */
.form-grid input,
.form-grid textarea {
  border: 1px solid #cfd8d5;
  border-radius: 10px;
  padding: 0.8rem;
  font-size: 1rem;
  background-color: #fff;
  font-family: inherit;
}

/* Allow textareas to grow vertically in forms. */
.form-grid textarea {
  resize: vertical;
  min-height: 140px;
}

/* Green outline when fields gain focus. */
.form-grid input:focus,
.form-grid textarea:focus {
  outline: 2px solid #2a6a4f;
  border-color: transparent;
}

/* Reusable primary action button inside forms. */
.primary-btn {
  border: none;
  background-color: #2a6a4f;
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  justify-self: flex-start;
  transition: background 0.2s ease;
}

/* Darker hover for the primary button. */
.primary-btn:hover {
  background-color: #1f513c;
}

/* Variant for “danger zone” sections (delete account). */
.danger-card {
  border-color: #f5c6c6;
  background-color: #fff8f8;
}

/* Destructive button styling (e.g., delete). */
.danger-btn {
  border: none;
  background-color: #c62828;
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  justify-self: flex-start;
  transition: background 0.2s ease;
}

/* Hover effect for the danger button. */
.danger-btn:hover {
  background-color: #9e1f1f;
}

/* Layout for the profile update form. */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

/* Align profile inputs side-by-side when possible. */
.profile-inline-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  width: 100%;
}

/* Allow inline fields to stretch evenly. */
.profile-inline-fields label {
  flex: 1;
  min-width: 220px;
}

/* Ensure bio/link inputs span the full width. */
.profile-bio-field,
.profile-link-field {
  width: 100%;
}

/* Give the biography textarea more height. */
.profile-bio-field textarea {
  min-height: 90px;
  font-family: inherit;
}

/* Align the profile submit button to the left. */
.profile-form .primary-btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* Inline feedback region beneath profile forms. */
.form-feedback {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: #1f513c;
  grid-column: 1 / -1;
  min-height: 1.2rem;
}

/* Error color for feedback text. */
.form-feedback.error {
  color: #b00020;
}

/* Stack nav and panels on medium screens. */
@media (max-width: 1024px) {
  #accountMain {
    flex-direction: column;
  }

  .account-nav {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
  }

  .account-nav-btn {
    flex: 1 1 calc(50% - 0.6rem);
  }
}

/* Tighten padding and stack lists/forms on phones. */
@media (max-width: 640px) {
  .account-panel {
    padding: 1.5rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .activity-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .item-types {
    width: 100%;
  }

  .member-since {
    text-align: left;
  }
}
/* Helper text under list headings (e.g., filter summary). */
.list-helper {
  margin: 0.15rem 0 0;
  color: #6d7d76;
  font-size: 0.85rem;
}

/* Animated collapse container for long lists. */
.list-content {
  position: relative;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Limit height when collapsed to preview items. */
.list-content.collapsed {
  max-height: 12rem;
  padding-bottom: 2.5rem;
}

/* Fade effect overlay when content is collapsed. */
.list-content.collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3rem;
  background: linear-gradient(180deg, rgba(249, 251, 248, 0), rgba(249, 251, 248, 0.9) 70%, #f9fbf7);
  pointer-events: none;
}

/* Compact ghost button variation for “Show all/Hide” toggles. */
.ghost-btn.small {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
}

.field-hint {
  font-size: 0.8rem;
  color: #5c6b64;
}

.field-hint.over-limit {
  color: #b00020;
  font-weight: 600;
}

/* Tickets */
