/**
 * custom.css
 * Shared component styles used across multiple pages.
 * Loaded globally via includes/static_components/head.php.
 */


/* ==========================================================================
   GLOBAL UTILITIES
   ========================================================================== */

/* Ensure images inside .ratio containers fill their container */
.ratio > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Pointer cursors */
.cursor-pointer { cursor: pointer; }

.form-check-label,
.form-check-input {
  cursor: pointer;
}

/* Hover opacity reveal for overlay controls (e.g. image edit buttons) */
.hover-effect-opacity .hover-effect-target { transition: opacity .15s ease-in-out; }
.hover-effect-opacity:hover .hover-effect-target { opacity: 1 !important; }

/* Ratio helper if theme variable isn't present */
.ratio { position: relative; width: 100%; }
.ratio::before { content: ""; display: block; padding-top: calc(var(--fn-aspect-ratio, 56.25%)); }


/* ==========================================================================
   CARD — shared shadow / border / hover
   ========================================================================== */

.card {
  border: 1px solid rgba(0, 0, 0, 0.11);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.card:hover {
  box-shadow: 0 15px 50px -10px rgba(0, 0, 0, 0.12);
}


/* ==========================================================================
   LISTING PILLS & PRICE
   ========================================================================== */

.listing-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 2rem;
  font-size: 0.75rem;
  color: #334155;
  white-space: nowrap;
}

.listing-price {
  color: #6D59EC;
}


/* ==========================================================================
   LISTING PLACEHOLDER — blurred fake card with CTA overlay
   ========================================================================== */

.listing-placeholder {
  position: relative;
  user-select: none;
}

.listing-placeholder-blur {
  filter: blur(7px);
  -webkit-filter: blur(7px);
}

.listing-placeholder-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(1px);
}

.listing-placeholder-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #111C49 0%, #6D59EC 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(109, 89, 236, 0.35);
}

@media (max-width: 575.98px) {
  .listing-placeholder-cta {
    font-size: 0.8rem;
    padding: 0.625rem 1rem;
  }
}

/* Request-variant placeholder: no image column, so min-height ensures the CTA has room */
.request-placeholder {
  min-height: 120px;
}


/* ==========================================================================
   FAVORITES BUTTON — heart toggle
   ========================================================================== */

.btn-favorite,
.btn-favorite-request {
  background-color: transparent;
  border: 0 !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
  position: relative;
}

.btn-favorite:focus,
.btn-favorite-request:focus {
  box-shadow: none !important;
}

.btn-favorite .fi-heart,
.btn-favorite .fi-heart-filled,
.btn-favorite-request .fi-heart,
.btn-favorite-request .fi-heart-filled {
  color: #6D59EC;
  transition: color .2s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

/* Not favorited: show outline, hide filled */
.btn-favorite .fi-heart,
.btn-favorite-request .fi-heart { opacity: 1; }

.btn-favorite .fi-heart-filled,
.btn-favorite-request .fi-heart-filled { opacity: 0; }

/* Not favorited hover: hide outline, show filled */
.btn-favorite:hover .fi-heart,
.btn-favorite-request:hover .fi-heart { opacity: 0; }

.btn-favorite:hover .fi-heart-filled,
.btn-favorite-request:hover .fi-heart-filled { opacity: 1; }

/* Favorited: hide outline, show filled */
.btn-favorite.is-favorited .fi-heart,
.btn-favorite-request.is-favorited .fi-heart { opacity: 0; }

.btn-favorite.is-favorited .fi-heart-filled,
.btn-favorite-request.is-favorited .fi-heart-filled { opacity: 1; }

/* Favorited hover: show outline, hide filled */
.btn-favorite.is-favorited:hover .fi-heart,
.btn-favorite-request.is-favorited:hover .fi-heart { opacity: 1; }

.btn-favorite.is-favorited:hover .fi-heart-filled,
.btn-favorite-request.is-favorited:hover .fi-heart-filled { opacity: 0; }

.btn-favorite:hover,
.btn-favorite-request:hover {
  background-color: #6D59EC;
}

.btn-favorite:hover .fi-heart,
.btn-favorite:hover .fi-heart-filled,
.btn-favorite-request:hover .fi-heart,
.btn-favorite-request:hover .fi-heart-filled {
  color: #fff;
}


/* ==========================================================================
   EDIT OBJECT BUTTON — top-right corner on owner's own listing
   ========================================================================== */

.btn-edit-object {
  background-color: transparent;
  border: 0 !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
  color: #6D59EC;
}

.btn-edit-object:focus {
  box-shadow: none !important;
}

.btn-edit-object .fi-edit {
  color: #6D59EC;
  transition: color 0.2s ease;
}

.btn-edit-object:hover {
  background-color: #6D59EC;
}

.btn-edit-object:hover .fi-edit {
  color: #fff;
}


/* ==========================================================================
   MATCHING REQUEST RIBBON & CARD
   ========================================================================== */

.ribbon-matching {
  position: absolute;
  top: -11px;
  left: 3px;
  background: linear-gradient(135deg, #111C49 0%, #6D59EC 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 4px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.card.card-matching {
  background-color: #edecff;
}


/* ==========================================================================
   REQUEST CARD — specs grid, pills, description, header pills
   ========================================================================== */

.request-specs {
  padding: 1rem 1.25rem;
  margin-top: 0.75rem;
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.875rem 1.5rem;
}

.param-group {
  min-width: 0;
}

.param-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7c3aed;
  margin-bottom: 0.4rem;
  display: block;
}

.param-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.param-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 2rem;
  font-size: 0.75rem;
  color: #334155;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.param-pill:hover {
  border-color: #ddd6fe;
  background: rgba(139, 92, 246, 0.04);
  color: #6d28d9;
}

.request-description {
  border-radius: 0 0.5rem 0.5rem 0;
  margin-top: 0.875rem;
  margin-bottom: 0.25rem;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.65;
}

.header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.875rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 2rem;
  font-size: 0.8rem;
  color: #475569;
  white-space: nowrap;
  line-height: 1.2;
}

@media (max-width: 575.98px) {
  .param-grid {
    grid-template-columns: 1fr;
  }

  .request-specs {
    padding: 0.875rem 1rem;
  }
}


/* ==========================================================================
   DIALOG CARDS — shared hover & layout for matching-requests / matching-objects modals
   ========================================================================== */

.dialog-card-hoverable {
  transition: background-color 0.15s ease;
}

.dialog-card-hoverable:hover {
  background-color: rgba(109, 89, 236, 0.07);
}

/* Request dialog list (my-objects → matching requests modal) */
.request-card-dialog {
  border-bottom: 1px solid #d5d7db;
}

.request-card-dialog:last-child {
  border-bottom: none;
}

.request-card-dialog > .d-flex {
  padding: 0;
  gap: 0 !important;
  align-items: stretch;
}

.request-dialog-image {
  width: 130px;
  background-color: #f1f5f9;
  flex-shrink: 0;
  position: relative;
  aspect-ratio: 4 / 3;
}

.request-dialog-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.request-dialog-content {
  padding: 1rem 1.25rem;
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 7.5rem;
}

.request-card-dialog .request-description {
  font-size: 0.8rem;
  line-height: 1.5;
}

.request-card-dialog .header-pills {
  gap: 0.3rem;
}

.request-card-dialog .header-pill {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
}

@media (min-width: 576px) {
  .request-dialog-image {
    width: 180px;
  }

  .request-dialog-content {
    padding: 1.25rem 1.5rem;
  }
}

/* Listing dialog list (my-requests → matching objects modal) */
.listing-card-dialog {
  border-bottom: 1px solid #d5d7db;
}

.listing-card-dialog:last-child {
  border-bottom: none;
}

.listing-card-dialog > .d-flex {
  padding: 0;
  gap: 0 !important;
  align-items: stretch;
}

.listing-dialog-image {
  width: 130px;
  background-color: #f1f5f9;
  flex-shrink: 0;
  position: relative;
  aspect-ratio: 4 / 3;
}

.listing-dialog-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-dialog-content {
  padding: 1rem 1.25rem;
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 576px) {
  .listing-dialog-image {
    width: 180px;
  }

  .listing-dialog-content {
    padding: 1.5rem 1.5rem;
  }
}


/* ==========================================================================
   EMAIL SUCCESS CHECKMARK (SVG animation used in contact modals)
   ========================================================================== */

.email-success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
}

.email-success-checkmark .circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #6D59EC;
  fill: none;
  animation: email-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.email-success-checkmark .check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 3;
  stroke: #6D59EC;
  fill: none;
  animation: email-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

@keyframes email-stroke {
  100% { stroke-dashoffset: 0; }
}


/* ==========================================================================
   NAV PILLS — active state (user area pages: my-objects, my-profile, my-requests)
   ========================================================================== */

.nav-pills .nav-link.active {
  border-color: #97a8cc;
  background-color: #c4d7f5;
  color: #000;
}

.nav-pills .show > .nav-link {
  background-color: #c4d7f5;
  color: #000;
}


/* ==========================================================================
   SEARCHABLE SELECT — custom dropdown component for location pickers
   ========================================================================== */

.searchable-select-wrapper { position: relative; }

.searchable-select-input {
  cursor: pointer;
  background-color: var(--bs-body-bg, #fff);
  caret-color: transparent;
  user-select: none;
}

.searchable-select-input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.searchable-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1020;
  margin-top: 0.25rem;
}

.searchable-select-options { padding: 0.25rem 0; }

.searchable-select-option {
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.15s ease-in-out;
}

.searchable-select-option:hover:not(.selected) { background-color: #ddd; }

.searchable-select-option.selected {
  background-color: var(--fn-btn-hover-bg, #080c20);
  color: white;
}

.searchable-select-option.selected:hover {
  background-color: var(--fn-btn-active-bg, #080c20);
}

/* Hide browser validation icons on the search input inside the dropdown */
.searchable-select-search { background-image: none !important; }

.was-validated .searchable-select-search:valid,
.was-validated .searchable-select-search:invalid {
  background-image: none !important;
  border-color: var(--bs-border-color) !important;
}


/* ==========================================================================
   STREET ACTIVE SELECTION
   ========================================================================== */

.street_active_selection_wrap { cursor: pointer; }


/* ==========================================================================
   ACTION BUTTONS — round edit/delete buttons (my-objects, my-requests)
   ========================================================================== */

.btn-action-edit,
.btn-action-delete {
  border-radius: 50% !important;
  transition: all 0.2s ease;
}

.btn-action-edit:hover {
  background-color: #0d6efd !important;
  border-color: #0d6efd !important;
  color: #fff !important;
}

.btn-action-delete:hover {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #fff !important;
}

@media (max-width: 575.98px) {
  .btn-action-edit {
    background-color: #6D59EC !important;
    border-color: #6D59EC !important;
    color: #fff !important;
  }

  .btn-action-delete {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
  }
}


/* ==========================================================================
   UNFAVORITE HEART — purple toggle (my-objects, my-requests)
   ========================================================================== */

.btn-unfavorite-heart {
  color: #6D59EC !important;
  transition: all 0.2s ease;
}

.btn-unfavorite-heart:hover {
  background-color: #6D59EC !important;
  color: #fff !important;
}


/* ==========================================================================
   STAT BOXES — hover cards for views/favorites/requests counts
   ========================================================================== */

.stat-box {
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.stat-box:hover {
  background-color: #f8f9fa !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-box-empty {
  background-color: #f5f5f5 !important;
  border-color: #e5e5e5 !important;
  cursor: default;
}

.stat-box-empty .stat-number {
  color: #adb5bd !important;
}

.stat-box-empty .stat-label {
  color: #adb5bd !important;
}

.stats-column {
  min-height: 170px;
  padding-top: 5.5rem !important;
  padding-bottom: 1rem !important;
}

.stats-column.stats-column-objects {
  padding-top: 2.5rem !important;
}

.stat-box,
.stat-box-empty {
  min-width: 80px !important;
  padding: 0.375rem 0.625rem !important;
}

.stat-box .stat-number,
.stat-box-empty .stat-number {
  font-size: 1.25rem;
}

.stat-box .stat-label,
.stat-box-empty .stat-label {
  font-size: 0.6rem !important;
}


/* ==========================================================================
   PASSWORD TOGGLE — input group styling (add/edit object forms)
   ========================================================================== */

#toggle_password_visibility {
  border: 1px solid var(--bs-border-color, #dee2e6) !important;
  border-left: none !important;
  background: transparent !important;
  color: var(--bs-secondary-color, #6c757d);
}

#toggle_password_visibility:hover,
#toggle_password_visibility:focus,
#toggle_password_visibility:active {
  background: transparent !important;
  border-color: var(--bs-border-color, #dee2e6) !important;
  box-shadow: none !important;
  color: var(--bs-secondary-color, #6c757d) !important;
}

#password_field_wrapper .input-group .form-control:focus + #toggle_password_visibility {
  border-color: var(--bs-body-color, #212529) !important;
}


/* ==========================================================================
   FEATURES COLLAPSIBLE — accordion for feature checkboxes (add/edit object)
   ========================================================================== */

.features-collapsible {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--bs-body-bg, #fff);
  transition: box-shadow 0.2s ease;
}

.features-collapsible:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.features-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--bs-light, #f8f9fa) 0%, var(--bs-body-bg, #fff) 100%);
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bs-body-color, #212529);
  transition: background 0.2s ease;
}

.features-toggle:hover {
  background: linear-gradient(135deg, #eef0f2 0%, var(--bs-light, #f8f9fa) 100%);
}

.features-toggle:focus {
  outline: none;
}

.features-toggle:focus-visible {
  box-shadow: inset 0 0 0 2px var(--bs-primary, #0d6efd);
}

.features-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary, #6c757d);
  flex-shrink: 0;
}

.features-toggle-text {
  flex-grow: 1;
}

.features-toggle-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--bs-secondary, #6c757d);
}

.features-toggle-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--bs-secondary, #6c757d);
  transition: transform 0.3s ease;
}

.features-toggle:not(.collapsed) .features-toggle-chevron {
  transform: rotate(180deg);
}

.features-body {
  padding: 0 1.25rem 1.5rem;
  border-top: 1px solid var(--bs-border-color, #dee2e6);
}

.features-body h3:first-child {
  margin-top: 1.25rem !important;
}


/* ==========================================================================
   HEADER — Skelbti dropdown & mobile navigation
   ========================================================================== */

.skelbti-dropdown {
  border-radius: 0.75rem;
}

.skelbti-options-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
}

.skelbti-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: center;
}

.skelbti-option-card:hover {
  transform: translateY(-2px);
}

.skelbti-separator {
  width: 1px;
  background-color: var(--bs-border-color, rgba(0, 0, 0, 0.1));
  margin: 0.5rem 0;
}

.skelbti-icon-box {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
  background: linear-gradient(135deg, #111C49 0%, #6D59EC 100%);
}

.skelbti-option-card:hover .skelbti-icon-box {
  transform: scale(1.1);
}

.skelbti-icon-box i {
  font-size: 1.5rem;
}

.skelbti-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #2D3748;
  margin-top: 0.25rem;
}

[data-bs-theme="dark"] .skelbti-label {
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .skelbti-separator {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-nav-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bs-secondary-color);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  color: var(--bs-body-color);
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
  background-color: transparent;
}

.mobile-nav-link:active,
.mobile-nav-link:hover {
  background-color: var(--bs-secondary-bg);
  color: var(--bs-primary);
}

.mobile-nav-link i {
  font-size: 1.25rem;
  margin-right: 1rem;
  width: 1.5rem;
  text-align: center;
  opacity: 0.8;
}

.mobile-skelbti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mobile-skelbti-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  background: linear-gradient(135deg, #111C49 0%, #6D59EC 100%);
  border-radius: 1.25rem;
  text-decoration: none;
  color: #fff !important;
  text-align: center;
  border: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(109, 89, 236, 0.25);
}

.mobile-skelbti-card:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(109, 89, 236, 0.15);
}

.mobile-skelbti-card .icon-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  backdrop-filter: blur(4px);
}

.mobile-skelbti-card .label {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}


/* ==========================================================================
   OBJECT TYPE NAV-PILLS — type selector tabs (objects.php)
   ========================================================================== */

.nav-pills-ot .nav-link.active {
  border-color: #d6d1fb;
  background-color: #edecff;
  color: #3b2d99;
}

.nav-pills-ot .show > .nav-link {
  background-color: #edecff;
  color: #3b2d99;
}

.nav-pills-ot .ot-icon {
  width: 20px;
  height: 20px;
}

.nav-pills-ot .ot-label {
  font-size: 0.65rem;
  line-height: 1.1;
  text-align: center;
}

.nav-pills-ot .nav-link-ot {
  min-height: auto;
}

@media (min-width: 576px) {
  .nav-pills-ot .ot-icon {
    width: 24px;
    height: 24px;
  }
  .nav-pills-ot .ot-label {
    font-size: 0.75rem;
  }
}

@media (min-width: 992px) {
  .nav-pills-ot .ot-icon {
    width: 32px;
    height: 32px;
  }
  .nav-pills-ot .ot-label {
    font-size: 0.875rem;
  }
}


/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0 1rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-consent.hiding {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.cookie-consent-content {
  max-width: 900px;
  margin: 0 auto 1.25rem;
  padding: 0.875rem 1.25rem;
  background: #fff;
  border: 1px solid #e0e5eb;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-consent-text {
  color: #4e5562;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

@media (max-width: 575.98px) {
  .cookie-consent {
    padding: 0 0.75rem;
  }

  .cookie-consent-content {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .cookie-consent-text {
    font-size: 0.8125rem;
    text-align: center;
  }

  .cookie-consent-content .btn {
    width: 100%;
  }
}


/* ==========================================================================
   MINI CHAT — buyer view (used on object.php and request.php)
   ========================================================================== */

.chat-mini-container {
  display: flex;
  flex-direction: column;
  max-height: 500px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #fff;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.chat-mini-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #f5f6f82e;
  min-height: 200px;
  max-height: 300px;
  padding: 0.75rem;
}

.chat-mini-messages-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.chat-mini-messages .chat-thread-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  box-sizing: border-box;
}

.chat-mini-composer {
  flex-shrink: 0;
  background-color: #fff;
  padding: 0.75rem !important;
}

.chat-mini-form {
  margin: 0;
}

.chat-mini-input {
  flex: 1;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
}

.chat-mini-input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: 0;
}

.chat-mini-input:disabled {
  background-color: #e9ecef;
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-mini-composer .btn {
  height: auto;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-mini-messages .chat-message {
  max-width: 80%;
}

.chat-mini-messages .chat-message-incoming {
  align-self: flex-start;
}

.chat-mini-messages .chat-message-outgoing {
  align-self: flex-end;
}

.chat-mini-messages .chat-bubble {
  font-size: 0.8125rem;
  line-height: 1.4;
  padding: 0.45rem 0.75rem;
}

@media (max-width: 575.98px) {
  .chat-mini-container {
    max-height: 400px;
    margin-left: 0;
    margin-right: 0;
  }

  .chat-mini-messages {
    max-height: 250px;
    padding: 0.5rem;
  }

  .chat-mini-composer {
    padding: 0.5rem !important;
  }
}


/* ==========================================================================
   MINI CHAT — owner view (object.php uses .chat-mini-owner-container,
   request.php uses .chat-mini-owner-request-container)
   ========================================================================== */

.chat-mini-owner-container,
.chat-mini-owner-request-container {
  display: flex;
  flex-direction: column;
  max-height: 500px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: #fff;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  position: relative;
}

.chat-mini-owner-list {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.chat-mini-owner-list-header {
  flex-shrink: 0;
  background-color: #f8f9fa;
}

.chat-mini-owner-conversation-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #f5f6f82e;
  min-height: 200px;
  max-height: 400px;
}

.chat-mini-owner-conversation-item {
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  z-index: 1;
  position: relative;
}

.chat-mini-owner-conversation-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.chat-mini-owner-conversation-item.active {
  background-color: rgba(13, 110, 253, 0.08);
  border-left: 3px solid #0d6efd;
}

.chat-mini-owner-thread {
  display: none;
  flex-direction: column;
  min-height: 200px;
  max-height: 500px;
  background-color: #fff;
  z-index: 10;
}

.chat-mini-owner-container.chat-mini-owner-thread-view .chat-mini-owner-list,
.chat-mini-owner-request-container.chat-mini-owner-thread-view .chat-mini-owner-list {
  display: none;
}

.chat-mini-owner-container.chat-mini-owner-thread-view .chat-mini-owner-thread,
.chat-mini-owner-request-container.chat-mini-owner-thread-view .chat-mini-owner-thread {
  display: flex;
}

.chat-mini-owner-thread-header {
  flex-shrink: 0;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
}

.chat-mini-owner-back-btn {
  text-decoration: none;
  color: inherit;
  border: none;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-mini-owner-back-btn:hover {
  opacity: 0.7;
}

.chat-mini-owner-thread-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #f5f6f82e;
  min-height: 200px;
  max-height: 300px;
  padding: 0.75rem;
}

.chat-mini-owner-thread-composer {
  flex-shrink: 0;
  background-color: #fff;
}

.chat-mini-owner-form {
  margin: 0;
}

.chat-mini-owner-input {
  flex: 1;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
}

.chat-mini-owner-input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  outline: 0;
}

.chat-mini-owner-input:disabled {
  background-color: #e9ecef;
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-mini-owner-thread-composer .btn {
  height: auto;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-mini-owner-thread-messages .chat-thread-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  box-sizing: border-box;
}

.chat-mini-owner-thread-messages .chat-message {
  max-width: 80%;
}

.chat-mini-owner-thread-messages .chat-message-incoming {
  align-self: flex-start;
}

.chat-mini-owner-thread-messages .chat-message-outgoing {
  align-self: flex-end;
}

.chat-mini-owner-thread-messages .chat-bubble {
  font-size: 0.8125rem;
  line-height: 1.4;
  padding: 0.45rem 0.75rem;
}

@media (max-width: 575.98px) {
  .chat-mini-owner-container,
  .chat-mini-owner-request-container {
    max-height: 400px;
    margin-left: 0;
    margin-right: 0;
  }

  .chat-mini-owner-conversation-list {
    max-height: 300px;
  }

  .chat-mini-owner-thread-messages {
    max-height: 250px;
    padding: 0.5rem;
  }

  .chat-mini-owner-thread-composer {
    padding: 0.5rem !important;
  }
}
