/* ==========================================================================
   My quotes (my-quotes.html)

   The old "blue bar + floating avatar" header, and the original bare
   <select>-based filter toolbar, have both been replaced as part of the
   account-pages UI revamp -- the shared header/nav/toolbar shell now
   lives in css/account-shared.css. This file covers what's specific to
   this page: the quote cards, the image gallery, and pagination.

   Design system: structural/generic values use the shared tokens from
   /css/tokens.css. The sent/received status badges keep their own
   green/amber shades (bright, high-contrast status colors -- a
   different role than the muted --success/--warning tokens).

   Dead rules removed during an earlier revamp (verified against
   my-quotes.js and my-quotes.html -- none of these are ever applied, in
   static markup or JS-built markup): .profile-header/.profile-top/
   .profile-avatar/.profile-basic-info/.main-card (superseded by
   .account-hero), .quote-filters/.filter-group/.toolbar-select-wrap/
   .quote-search-wrap/.quote-search-box (superseded by .account-toolbar/
   .account-chip), .quotes-empty-state (superseded by
   .account-empty-state), plus .section-title, .btn-primary-custom,
   .services-container/.service-card, .profile-details(-modern),
   .detail-meta, .high_light, .main-content and .gradient-section, none
   of which any element on this page carries.
   ========================================================================== */

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Inter", "Quicksand", "Poppins", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

.page-subtitle {
  margin-top: 6px;
  margin-bottom: 0;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  max-width: 520px;
}

/* ==========================================================================
   Home button (mobile navbar)
   ========================================================================== */
.home-btn {
  width: 56px;
  height: 56px;
  background: #dedfe0;
  border-radius: 50%;
  color: #000;
  text-decoration: none;
  margin-left: -5px;
  transition: all 0.2s ease;
}

.home-btn:hover {
  background-color: #e9ecef;
  color: #000;
  transform: scale(1.05);
}

.home-btn:active {
  transform: scale(0.95);
}

.home-btn i {
  font-size: 1.5rem;
  line-height: 1;
}

.home-text {
  font-size: 10px;
  line-height: 1;
  margin-top: 2px;
  color: #1f2937;
}

/* ==========================================================================
   Quote cards
   ========================================================================== */
.modern-listing-card {
  /* .quote-card (below) supplies border/radius/background/box-shadow/
     margin for the same element; this only adds anything it doesn't. */
  margin-bottom: 0;
}

.quote-card {
  max-width: 850px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface) 0%, #fbfdff 100%);
  box-shadow: var(--shadow-md);
  margin: 22px auto 36px auto;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.quote-card:hover {
  box-shadow: var(--shadow-lg);
}

.quote-business-title {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 8px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Header: status icon + title/badges + date
   ========================================================================== */
.listing-tile-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border-color);
}

.listing-tile-logo-wrap {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.listing-tile-logo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
}

/* Sent/Received badge stacked under the icon instead of sharing a line
   with the business name -- smaller than the default .quote-badge so it
   doesn't force the tile wider than the 64px icon above it. Compound
   selector (not just .quote-badge--under-icon) so this reliably beats
   .quote-badge's own font-size/padding/display regardless of source
   order. Rendered twice in the markup (here, and again inline next to
   the Quote ID pill) -- only one is ever visible at a time, toggled by
   the breakpoint below, since the two live in different parent
   containers and can't be repositioned with CSS alone. Desktop default:
   this copy is hidden (the inline one next to Quote ID shows instead);
   swapped back below 769px.  */
.quote-badge.quote-badge--under-icon {
  display: none;
  font-size: 0.62rem;
  padding: 4px 8px;
}

.quote-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.quote-tile-icon--sent {
  background: linear-gradient(180deg, #e7f9ee 0%, #d3f3e0 100%);
  border: 1px solid #bdead1;
  color: var(--cta-green-dark);
}

.quote-tile-icon--received {
  background: linear-gradient(180deg, #fef3e0 0%, #fce6c2 100%);
  border: 1px solid #f6d9a0;
  color: #b45309;
}

.listing-tile-heading {
  flex: 1;
  min-width: 0;
}

.listing-tile-posted {
  flex-shrink: 0;
  /* Sits under the icon/badge in .listing-tile-logo-wrap now -- centered
     like its siblings there. */
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: center;
}

.quote-card-content {
  padding: var(--space-5) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.quote-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}

.quote-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Status badges -- bright, high-contrast colors, a different role than
   the muted --warning/--success tokens. .quote-badge-sent's green
   happens to be an exact match for --cta-green, used directly. */
.quote-badge-received {
  background: #f59e0b;
  color: #000;
  border: 1px solid #f59e0b;
}

.quote-badge-sent {
  background: var(--cta-green);
  color: #000;
  border: 1px solid var(--cta-green);
}

.quote-id-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  white-space: normal;
  overflow-wrap: anywhere;
}

.quote-section-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--primary-dark);
  margin: 0 0 var(--space-1);
  line-height: 1.3;
}

/* .quote-card-content is a flex column (align-items: stretch by
   default), so this needs its own align-self or it stretches to the
   card's full width like a block button instead of sizing to its text. */
.quote-details-toggle {
  align-self: flex-start;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  cursor: pointer;
}

.quote-details-toggle:hover {
  opacity: 0.8;
}

/* :not([hidden]) so this doesn't fight the [hidden] attribute's own
   display:none -- a plain .quote-details-collapsible { display: flex }
   here would win over it (author stylesheet beats the UA default
   regardless of matching specificity), leaving it visible while hidden. */
.quote-details-collapsible:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.quote-details-list {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
  overflow: hidden;
}

.quote-detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 15px;
}

.quote-detail-row + .quote-detail-row {
  border-top: 1px solid var(--border-color);
}

.quote-detail-label {
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.quote-detail-value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.4;
  text-align: right;
  word-break: break-word;
}

.quote-detail-value a {
  color: var(--primary);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.quote-detail-value a:hover {
  text-decoration: underline;
}

.quote-detail-value--phone {
  font-size: 1.05rem;
}

.quote-detail-value--phone > a {
  white-space: nowrap;
}

.quote-description-box {
  margin-top: 2px;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: #fffdf7;
  border: 1px solid #f3ead0;
}

.quote-description-label {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-body);
  margin-bottom: var(--space-2);
}

.quote-description-text {
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--text-body);
  white-space: pre-line;
  word-break: break-word;
}

.quote-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.quote-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: var(--radius-full);
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  font-size: 0.84rem;
  color: var(--text-body);
  font-weight: var(--font-weight-semibold);
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 6px;
  border-radius: var(--radius-full);
  background: #e9f9f4;
  border: 1px solid #c9ede2;
  color: #0e7c6b;
  font-size: 0.78rem;
  font-weight: var(--font-weight-bold);
  text-decoration: none;
}

.whatsapp-link:hover {
  background: #ddf5ee;
  opacity: 1;
}

.whatsapp-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

/* ==========================================================================
   Toolbar (view listing + mark as read)
   ========================================================================== */
.listing-tile-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: var(--space-3);
}

.listing-tile-primary-btn {
  flex: 1 1 200px;
  max-width: 320px;
}

.listing-tile-toolbar-secondary {
  display: flex;
  flex: 1 1 160px;
  gap: var(--space-3);
}

.listing-tile-toolbar-secondary .post-btn-secondary {
  flex: 1;
}

/* Desktop only: don't let the buttons flex-grow to fill the toolbar --
   size them to their content instead and center the pair, matching
   .listing-tile-toolbar's existing (previously moot, since flex-grow was
   already consuming all the width) justify-content: center. Mobile keeps
   the full-width stacked buttons above. */
@media (min-width: 769px) {
  .listing-tile-primary-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 160px;
    max-width: 220px;
  }

  .listing-tile-toolbar-secondary {
    flex: 0 0 auto;
  }

  .listing-tile-toolbar-secondary .post-btn-secondary {
    flex: 0 0 auto;
    width: auto;
    min-width: 160px;
    max-width: 220px;
  }
}

.post-btn,
.post-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: var(--font-weight-bold);
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

/* Was hardcoded to Facebook's brand blue (#1877f2) -- unrelated to
   Facebook, the same accidental copy-paste found across the other
   account/request pages. Uses the site's actual brand color now. */
.post-btn {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.15);
}

.post-btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  opacity: 1;
}

.post-btn-secondary {
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  cursor: pointer;
}

.post-btn-secondary:hover {
  background: var(--surface);
  border-color: rgba(var(--primary-rgb), 0.35);
  color: var(--primary);
  opacity: 1;
}

@media (max-width: 768px) {
  .quote-card {
    margin: 18px 12px 28px 12px;
    border-radius: var(--radius-lg);
  }

  .listing-tile-header {
    padding: var(--space-4);
    flex-wrap: wrap;
  }

  .quote-card-content {
    padding: var(--space-4);
  }

  .quote-business-title {
    font-size: 1.25rem;
  }

  .listing-tile-toolbar-secondary {
    flex-direction: column;
  }

  /* Swap back: under-icon badge shows, inline copy (next to Quote ID) hides. */
  .quote-badge.quote-badge--under-icon {
    display: inline-flex;
  }

  .quote-badge.quote-badge--inline {
    display: none;
  }
}

/* ==========================================================================
   Quote image gallery
   ========================================================================== */
.quote-images-section {
  grid-column: 1 / -1;
  margin-top: 2px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.quote-gallery-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.quote-gallery {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: var(--space-3) 0 4px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;

  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.quote-gallery::-webkit-scrollbar {
  display: none;
}

.quote-photo-item {
  flex: 0 0 auto;
  width: 220px;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  scroll-snap-align: start;
  background-color: var(--surface-alt);
  transition: transform 0.3s ease;
}

.quote-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.quote-photo-item:hover img {
  transform: scale(1.05);
}

.quote-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.88);
  border: none;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: background 0.2s ease;
  z-index: 10;
}

.quote-gallery-arrow:hover {
  background-color: rgba(255, 255, 255, 1);
}

.quote-gallery-arrow.left {
  left: 10px;
}
.quote-gallery-arrow.right {
  right: 10px;
}

@media (min-width: 768px) {
  .quote-photo-item {
    width: 220px;
    height: 220px;
  }

  .quote-gallery {
    gap: var(--space-4);
    padding: var(--space-4) 0 6px 0;
  }

  .quote-gallery-arrow {
    width: 50px;
    height: 50px;
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .quote-photo-item {
    width: 78vw;
    max-width: 260px;
    height: 260px;
  }
}

.quote-images-mount {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.quotes-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  margin: -30px 0 60px 0;
}

.quotes-pagination button {
  padding: 10px var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--surface);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quotes-pagination button:hover:not(:disabled) {
  background: var(--surface-alt);
}

.quotes-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quotes-pagination-info {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
