/* Layout helper for two-column sections */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* Ensure nested .form-row stacks neatly inside columns */
.form-grid-2 > .form-row {
  display: block;
}

.location-tools .coords-display {
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.08em;
}

.centered-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.location-tools.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Vertically center the right-hand grid cell (Use current location) */
.form-grid-2 > .form-row:last-child {
  align-self: center;
}

.or-separator {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
  letter-spacing: 0.08em;
}
/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 Reset & Globals
2.0 Trip Archive (Shortcode)
3.0 Single Trip & Activity Styles
4.0 Modals (Lightbox, Traveller List)
5.0 Admin Bar
6.0 New Trip Form
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 Reset & Globals
--------------------------------------------------------------*/
.wp-travel-plus-trip-archive *,
.wp-travel-plus-trip-single * {
  box-sizing: border-box;
}

/*--------------------------------------------------------------
2.0 Trip Archive (Shortcode)
--------------------------------------------------------------*/
.wp-travel-plus-trip-archive {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ensure all child elements also use full width */
.wp-travel-plus-trip-archive > * {
  width: 100%;
  box-sizing: border-box;
}

.status-group {
  margin-bottom: 3rem;
}

.status-title {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: #3b82f6;
  font-weight: 600;
}

/* Status Groups */
.status-group {
  margin-bottom: 3rem;
}

.status-group:last-child {
  margin-bottom: 0;
}

.status-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 100%;
}

.trip-archive-message {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: #666;
}

/* Add Trip Floating Action Button */
.wp-travel-plus-fab-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}
.wp-travel-plus-fab {
  width: 60px;
  height: 60px;
  background-color: var(
    --wp--preset--color--primary,
    #1a73e8
  ); /* Use theme's primary color with a fallback */
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease-out, background-color 0.2s;
}
.wp-travel-plus-fab .dashicons {
  width: auto;
  height: auto;
  font-size: 32px;
}

.wp-travel-plus-fab:hover {
  background-color: var(
    --wp--preset--color--secondary,
    #1868cc
  ); /* Use theme's secondary for hover, with fallback */
  transform: scale(1.05);
}

/* === CARD STYLES FOR "My Trips And Plans" === */
.trip-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 1.5rem;
  border-radius: 12px;
  background-color: transparent;
  border: 1px solid transparent;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.trip-card:hover {
  background-color: #f8f9fa;
  border-color: #f0f0f0;
}

.trip-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.trip-card-avatar {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
}

.trip-card-avatar img,
.trip-card-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.trip-card-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e9ecef;
}

.trip-card-avatar-placeholder .dashicons {
  font-size: 30px;
  width: 30px;
  height: 30px;
  color: #adb5bd;
}

.trip-card-body {
  flex-grow: 1;
}

.trip-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #212529;
}

.trip-card-subline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trip-card-travellers {
  display: flex;
  align-items: center;
}

.trip-card-travellers .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  margin-right: -6px; /* overlap slightly */
}

.trip-card-subline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  gap: 1rem;
}

.trip-card-travellers {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.trip-card-travellers .avatar {
  border-radius: 50%;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.trip-card-dates {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0;
  flex-shrink: 0;
}

.trip-card-divider {
  width: 25px;
  height: 2px;
  background-color: #dee2e6;
  margin: 0.75rem 0;
}

.trip-card-excerpt {
  font-size: 1rem;
  color: #495057;
  line-height: 1.6;
}
.trip-card-excerpt p {
  margin: 0;
}

.trip-card-status-wrapper {
  margin-left: auto;
  flex-shrink: 0;
  padding-left: 1rem;
}

.trip-card-status {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  background-color: #6c757d; /* Default Grey */
  text-transform: capitalize;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* === CARD STYLES FOR "My Bucket List" === */
/* These remain as simple cards, no change from previous state */

/* 
 * Unified Status Colors 
 * Based on src/Database/Seeder.php
 * Applied to both single trip headers and archive cards.
 */
.status-dreaming {
  background-color: #95a5a6; /* Asbestos Gray */
  color: #fff;
}
.status-active {
  background-color: #2ecc71; /* Emerald Green */
  color: #fff;
}
.status-a-memory {
  background-color: #3498db; /* Peter River Blue */
  color: #fff;
}
.status-bucket-list {
  background-color: #1abc9c; /* Turquoise */
  color: #fff;
}

/*--------------------------------------------------------------
3.0 Single Trip & Activity Styles
--------------------------------------------------------------*/

.wp-travel-plus-trip-single .entry-header {
  position: relative;
  background-size: cover;
  background-position: center center;
  padding: 2rem 1rem 5.5rem; /* Increased bottom padding */
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}

.wp-travel-plus-trip-single .entry-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  z-index: 1;
}

.wp-travel-plus-trip-single .header-content-wrapper {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wp-travel-plus-trip-single .trip-featured-image-single {
  display: none;
}
.wp-travel-plus-trip-single .entry-title {
  display: none;
}

.wp-travel-plus-trip-single .trip-dates {
  font-size: 1.1rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  order: 2;
}

.wp-travel-plus-trip-single .title-status-wrapper {
  display: contents;
}
.wp-travel-plus-trip-single .trip-card-status {
  order: 3;
}

.wp-travel-plus-trip-single .entry-excerpt {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  order: 4;
}

.wp-travel-plus-trip-single .trip-meta-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background-color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin: -4rem auto 2rem;
  max-width: 90%;
  position: relative;
  z-index: 10;
}

.wp-travel-plus-trip-single .trip-stats {
  display: flex;
  gap: 1.5rem;
}
.wp-travel-plus-trip-single .stat-card {
  text-align: center;
}
.wp-travel-plus-trip-single .stat-number {
  font-size: 1.5rem;
  font-weight: 600;
  display: block;
}
.wp-travel-plus-trip-single .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #666;
}
.wp-travel-plus-trip-single .trip-countries {
  display: flex;
  gap: 0.5rem;
  order: 1;
  flex-wrap: wrap;
  justify-content: center;
}
.wp-travel-plus-trip-single .country-flag {
  font-size: 3.5rem;
}

.wp-travel-plus-trip-single .trip-travellers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.wp-travel-plus-trip-single .traveller-label {
  font-size: 0.9rem;
  font-weight: 500;
}
.wp-travel-plus-trip-single .avatar-group {
  display: flex;
  align-items: center;
}

.wp-travel-plus-trip-single .avatar-wrapper {
  margin-left: -12px;
  border: 2px solid #fff;
  border-radius: 50%;
  overflow: hidden;
  width: 32px;
  height: 32px;
}
.wp-travel-plus-trip-single .avatar-wrapper img {
  display: block;
  width: 100%;
  height: auto;
}

.wp-travel-plus-trip-single .avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #e5e7eb;
  color: #4b5563;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid #fff;
  margin-left: -12px;
}

.wp-travel-plus-trip-single .entry-content {
  padding: 1rem 0;
}
.wp-travel-plus-trip-single .activity-feed {
  margin-top: 3rem;
}
.wp-travel-plus-trip-single .feed-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.activity-card {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  border: 1px solid #e5e7eb;
}

.activity-card.is-private {
  border-left: 4px solid #6b7280;
}
.activity-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}
.author-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.author-details img.avatar {
  border-radius: 50%;
}
.author-info {
  font-weight: 600;
}

.activity-type-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #6b7280;
  background-color: #f3f4f6;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.activity-type-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}
.activity-body {
  padding: 1.25rem;
}
.activity-title {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
.activity-title a {
  text-decoration: none;
  color: inherit;
}
.activity-title a:hover {
  text-decoration: underline;
}
.activity-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}
.activity-meta .activity-time {
  font-style: italic;
}
.activity-meta .weather-icon {
  vertical-align: middle;
}
.activity-prose {
  line-height: 1.6;
}
.activity-gallery-unified {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.activity-gallery-unified.gallery-count-1 {
  grid-template-columns: 1fr;
  max-height: 500px;
}
.activity-gallery-unified.gallery-count-1 .wtp-gallery-item {
  grid-row: 1 / 1;
  grid-column: 1 / 1;
}
.activity-gallery-unified.gallery-count-2 {
  grid-template-columns: repeat(2, 1fr);
  max-height: 250px; /* Limit height for 2 images */
}
.activity-gallery-unified.gallery-count-3 {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  max-height: 350px; /* Limit height for 3 images */
}
.activity-gallery-unified.gallery-count-3 .wtp-gallery-item:first-child {
  grid-row: 1 / 3;
}
.activity-gallery-unified.gallery-count-4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  max-height: 400px; /* Limit height for 4 images to prevent excessive height */
}
.activity-gallery-unified.gallery-count-5,
.activity-gallery-unified.gallery-count-5-plus {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 300px 200px; /* Increased from 200px 130px to 300px 200px */
}
.activity-gallery-unified.gallery-count-5 .wtp-gallery-item:nth-child(1),
.activity-gallery-unified.gallery-count-5-plus .wtp-gallery-item:nth-child(1) {
  grid-column: 1 / 4;
  grid-row: 1 / 2;
}
.activity-gallery-unified.gallery-count-5 .wtp-gallery-item:nth-child(2),
.activity-gallery-unified.gallery-count-5-plus .wtp-gallery-item:nth-child(2) {
  grid-column: 4 / 7;
  grid-row: 1 / 2;
}
.activity-gallery-unified.gallery-count-5 .wtp-gallery-item:nth-child(3),
.activity-gallery-unified.gallery-count-5-plus .wtp-gallery-item:nth-child(3) {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
}
.activity-gallery-unified.gallery-count-5 .wtp-gallery-item:nth-child(4),
.activity-gallery-unified.gallery-count-5-plus .wtp-gallery-item:nth-child(4) {
  grid-column: 3 / 5;
  grid-row: 2 / 3;
}
.activity-gallery-unified.gallery-count-5 .wtp-gallery-item:nth-child(5),
.activity-gallery-unified.gallery-count-5-plus .wtp-gallery-item:nth-child(5) {
  grid-column: 5 / 7;
  grid-row: 2 / 3;
}
.activity-gallery-unified .wtp-gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: #eee;
  border-radius: 0;
}
.activity-gallery-unified .wtp-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.activity-gallery-unified .wtp-gallery-item:hover img {
  filter: brightness(0.9);
}

/* Overlay for the gallery hover icon */
.activity-gallery-unified .wtp-gallery-item {
  position: relative;
  overflow: hidden; /* Important for the pseudo-element to stay contained */
}

.activity-gallery-unified .wtp-gallery-item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0); /* Start transparent */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='white'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z' /%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px;
  opacity: 0;
  transition: all 0.2s ease-in-out;
  pointer-events: none; /* Allows clicks to pass through to the element underneath */
}

.activity-gallery-unified .wtp-gallery-item:hover::after {
  background-color: rgba(0, 0, 0, 0.4); /* Darken on hover */
  opacity: 1;
}

/* This is the overlay for the "+X more" message on large galleries */
.wtp-gallery-item .gallery-more-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  z-index: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.wtp-gallery-item .gallery-more-overlay:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Hide additional gallery items beyond the first 5 */
.hidden-gallery-item {
  display: none !important;
}

/*--------------------------------------------------------------
4.0 Modals (Lightbox, Traveller List)
--------------------------------------------------------------*/
.image-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgb(0, 0, 0);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
  cursor: pointer;
}
.image-modal.show {
  display: flex;
}

/* Modal Navigation */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10001;
  backdrop-filter: blur(10px);
}

.modal-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.modal-nav svg {
  width: 24px;
  height: 24px;
  color: white;
  stroke-width: 2;
}

.modal-nav-prev {
  left: 20px;
}

.modal-nav-next {
  right: 20px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  color: white;
  z-index: 10001;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
}

.modal-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10001;
  backdrop-filter: blur(10px);
}

/* Responsive styles for mobile devices */
@media (max-width: 768px) {
  .modal-nav {
    width: 40px;
    height: 40px;
  }

  .modal-nav svg {
    width: 20px;
    height: 20px;
  }

  .modal-nav-prev {
    left: 10px;
  }

  .modal-nav-next {
    right: 10px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .modal-counter {
    bottom: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes zoomIn {
  from {
    transform: scale(0.8);
  }
  to {
    transform: scale(1);
  }
}

.wtp-modal {
  display: none;
  position: fixed;
  z-index: 10001;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.wtp-modal.show {
  display: flex;
}
.wtp-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: zoomIn 0.3s ease;
}
.wtp-modal-title {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
}
.traveller-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.traveller-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.traveller-item .avatar {
  border-radius: 50%;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: cover;
}
.traveller-name {
  font-weight: 500;
  line-height: 1.2;
}
.traveller-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
  width: 100%;
}
.traveller-link:hover {
  opacity: 0.8;
  text-decoration: none;
  color: inherit;
}
.traveller-link .avatar {
  border-radius: 50%;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: cover;
}
.traveller-link .traveller-name {
  font-weight: 500;
  line-height: 1.2;
}

/*--------------------------------------------------------------
5.0 Admin Bar
--------------------------------------------------------------*/
body.admin-bar .add-trip-button {
  top: 42px;
}

/*--------------------------------------------------------------
6.0 New Trip Form
--------------------------------------------------------------*/
.wp-travel-plus-new-trip-form {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.wp-travel-plus-new-trip-form .page-title {
  font-size: 1.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.wp-travel-plus-new-trip-form .form-row {
  margin-bottom: 2rem;
}

.wp-travel-plus-new-trip-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #333;
}

.wp-travel-plus-new-trip-form input[type="text"],
.wp-travel-plus-new-trip-form input[type="datetime-local"],
.wp-travel-plus-new-trip-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

/* Custom Radio Buttons (Status) - Segmented Control Style */
.status-button-group {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

.status-button-group label {
  flex: 1; /* Each button takes equal space */
  text-align: center;
  padding: 0.75rem;
  cursor: pointer;
  background-color: #f9f9f9;
  color: #555;
  transition: background-color 0.2s, color 0.2s;
  border-left: 1px solid #ccc;
  margin-bottom: 0;
  font-weight: 500;
}

.status-button-group label:first-of-type {
  border-left: none; /* No left border on the first button */
}

/* Hide default radio */
.status-button-group input[type="radio"] {
  display: none;
}

/* Selected state for the label */
.status-button-group input[type="radio"]:checked + label {
  background-color: #0073aa;
  color: white;
  border-color: #0073aa;
}

/* Checkboxes (Countries) */
.country-selection-group {
  max-height: 300px;
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  transition: border-color 0.2s;
}

.country-checkbox label {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

/* Hide default checkbox */
.country-checkbox input[type="checkbox"] {
  display: none;
}

/* Custom checkbox appearance */
.country-checkbox label::before {
  content: "";
  display: inline-block;
  margin-right: 0.75rem;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 2px solid #ccc;
  background-color: #fff;
}

/* Checkbox checked state */
.country-checkbox input[type="checkbox"]:checked + label::before {
  border-color: #0073aa;
  background-color: #0073aa;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
  background-position: center;
  background-repeat: no-repeat;
}

.country-checkbox {
  display: block; /* Ensures each checkbox is on its own line */
}

.dropzone {
  border: 2px dashed #ccc;
  border-radius: 4px;
  padding: 3rem;
  text-align: center;
  color: #888;
  cursor: pointer;
  transition: border-color 0.2s;
}
.dropzone.dz-drag-hover {
  border-color: #0073aa;
}

#create-trip-submit-button,
#create-activity-submit-button {
  padding: 0.75rem 1.5rem;
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
#create-trip-submit-button:hover,
#create-activity-submit-button:hover {
  background-color: #005a87;
}

#image-preview {
  margin-top: 1rem;
}
#image-preview img {
  max-width: 150px;
  height: auto;
  border-radius: 4px;
}

.private-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background-color: #f0f0f0; /* Light gray circle */
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.private-lock svg {
  width: 14px;
  height: 14px;
  stroke: #555; /* Dark gray icon color */
}

/* Privacy Toggle Switch */
.wp-travel-plus-new-trip-form .checkbox-wrapper {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.wp-travel-plus-new-trip-form .checkbox-wrapper .checkbox-label {
  margin-left: 12px;
}
.wp-travel-plus-new-trip-form input[type="checkbox"] {
  position: relative;
  width: 44px;
  height: 24px;
  -webkit-appearance: none;
  appearance: none;
  background: #ccc;
  outline: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}

.wp-travel-plus-new-trip-form input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: left 0.3s;
}

.wp-travel-plus-new-trip-form input[type="checkbox"]:checked {
  background: var(--wp--preset--color--primary, #0073aa);
}

.wp-travel-plus-new-trip-form input[type="checkbox"]:checked::before {
  left: 22px;
}

.wp-travel-plus-new-trip-form .page-subtitle {
  font-size: 1rem;
  color: #666;
  margin-top: -15px;
}

/* Weather Icon Selector */
.weather-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 12px; /* A bit more space */
  align-items: center;
}
.weather-option {
  cursor: pointer;
  border-radius: 50%;
  background: #f8f9fa;
  transition: all 0.2s ease-in-out;
  width: 56px;
  height: 56px;
  text-align: center; /* Center horizontally */
  line-height: 56px; /* Vertically center by matching height */
  box-sizing: border-box;
  box-shadow: 0 0 0 1px #ddd;
}
.weather-option:hover {
  background: #e9ecef;
  box-shadow: 0 0 0 1px #ccc;
}

.weather-selector input[type="radio"]:checked + .weather-icon {
  transform: scale(1.1);
}

.weather-selector input[type="radio"]:checked + .weather-icon {
  /* The emoji itself doesn't need much styling, but the parent label does */
}

/* This is the key part to style the parent label of the checked radio */
.weather-selector input[type="radio"]:checked ~ .weather-icon {
  /* this selector is tricky with just spans, let's target the parent label from JS or use a different approach if needed */
}

.weather-selector .weather-option.checked {
  box-shadow: 0 0 0 2px var(--wp--preset--color--primary, #0073aa); /* Thicker blue "border" */
  background: #fff;
}

.weather-icon {
  line-height: 1; /* Reset line-height for the icon itself */
  display: inline-block;
  vertical-align: middle; /* Aligns the icon within the parent's line-height */
  transition: all 0.2s ease-in-out;
}

/* Temperature Input */
.wp-travel-plus-new-trip-form input[type="number"] {
  padding: 10px 15px;
}

/* Datetime-local input specific styling */
.wp-travel-plus-new-trip-form input[type="datetime-local"] {
  /* Reset some browser default styles */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Ensure consistent styling across browsers */
  background-color: #fff;
  color: #333;
  font-family: inherit;
  line-height: 1.5;

  /* Handle focus state */
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.wp-travel-plus-new-trip-form input[type="datetime-local"]:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Style the calendar and time picker icons */
.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  background-color: transparent;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  background-color: #f0f0f0;
}

/* Firefox specific styling */
.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-moz-datetime-picker {
  background-color: #fff;
}

/* Ensure consistent height with other inputs */
.wp-travel-plus-new-trip-form input[type="datetime-local"] {
  min-height: 2.75rem; /* Match the height of other inputs */
}

/* Remove any default spacing issues */
.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-webkit-datetime-edit-text {
  color: #333;
  padding: 0 2px;
}

.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-webkit-datetime-edit-month-field,
.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-webkit-datetime-edit-day-field,
.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-webkit-datetime-edit-year-field,
.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
.wp-travel-plus-new-trip-form
  input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
  padding: 0 1px;
  color: #333;
}

/* Placeholder styling when no value is set */
.wp-travel-plus-new-trip-form input[type="datetime-local"]:invalid {
  color: #999;
}

/* Add a subtle border radius to match other inputs */
.wp-travel-plus-new-trip-form input[type="datetime-local"] {
  border-radius: 4px;
}

/* Ensure disabled state looks consistent */
.wp-travel-plus-new-trip-form input[type="datetime-local"]:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.wp-travel-plus-new-trip-form .dz-message {
  margin: 2em 0;
  font-weight: 500;
  color: #555;
}

/* Ensure no default button styling appears inside the message */
.wp-travel-plus-new-trip-form .dz-message .dz-button {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.activity-documents {
  margin-top: 1.5rem;
  border-top: 1px solid var(--wp-travel-plus-border-color);
  padding-top: 1rem;
}

.documents-title {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.document-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.document-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background-color: #f9f9f9;
  border: 1px solid var(--wp-travel-plus-light-gray-color);
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.document-item:hover {
  background-color: #f0f0f0;
  border-color: #ccc;
}

.document-icon {
  margin-right: 1rem;
  flex-shrink: 0;
}

.document-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  color: #555;
}

.document-name {
  flex-grow: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
}

.document-actions {
  font-size: 0.9rem;
}

.document-actions a {
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 500;
  color: var(--wp-travel-plus-primary-color);
}

.document-actions a:hover {
  text-decoration: underline;
}

.activity-documents .document-list .document-item .document-link:hover {
  background-color: #f0f0f0;
  color: #1a1a1a;
}

/* Tabs for Trip Activity */
.wp-travel-plus-tabs {
  margin-top: 2rem;
}

.wp-travel-plus-tabs .tab-links {
  display: flex;
  margin: 0;
  padding: 0;
  border-bottom: 2px solid #e0e0e0;
  list-style: none;
}

.wp-travel-plus-tabs .tab-links li {
  margin: 0;
  padding: 0;
}

.wp-travel-plus-tabs .tab-links a {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease-in-out;
}

.wp-travel-plus-tabs .tab-links li.active a,
.wp-travel-plus-tabs .tab-links a:hover {
  color: #0073aa;
  border-bottom-color: #0073aa;
}

.wp-travel-plus-tabs .tab-content .tab {
  display: none;
  padding: 1.5rem 0;
}

.wp-travel-plus-tabs .tab-content .tab.active {
  display: block;
}

.document-section-card {
  background-color: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin-bottom: 2rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.document-section-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 0.75rem;
}

.document-section-description {
  font-size: 0.9rem;
  color: #666;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.document-filter-container {
  margin-bottom: 1.5rem;
}

#trip-document-filter {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box; /* Ensures padding doesn't affect width */
}

.document-list .document-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.document-list .document-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.document-list .document-details {
  display: flex;
  flex-direction: column;
}

.document-upload-date {
  font-size: 0.8rem;
  color: #666;
  margin-top: 2px;
}

/* --- Activity Social Bar --- */
.activity-social-bar {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid #eee;
  align-items: center;
}

.social-loves,
.social-comments {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.love-button,
.comment-button,
.social-map .map-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1; /* Aligns SVG properly */
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.love-button svg,
.comment-button svg,
.social-map .map-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.love-button:disabled svg {
  stroke: #ccc;
}

.love-button[data-user-has-loved="true"] svg {
  fill: #e74c3c; /* Red color for a loved item */
  stroke: #e74c3c;
}

.love-button[data-user-has-loved="false"] svg {
  fill: none;
}

.love-count,
.comment-count {
  font-size: 0.85rem;
  font-weight: 400;
  color: #666;
}

/* --- Comments Area --- */
.activity-comments-container {
  padding: 1rem 1.5rem 1.5rem;
  background-color: #f9f9f9;
  border-top: 1px solid #eee;
}

.comments-area .comments-title,
.comments-area .comment-reply-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
}

.comments-area .comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comments-area .comment-list li.activity-comment {
  display: grid;
  grid-template-columns: 48px 1fr; /* Avatar width | The rest */
  gap: 1rem; /* Spacing between avatar and main content */
  padding: 1rem;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.comments-area .comment-avatar .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.comments-area .comment-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem; /* Tighter vertical gap */
}

.comments-area .comment-author-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.comments-area .comment-author-name a {
  color: inherit;
  text-decoration: none;
}
.comments-area .comment-author-name a:hover {
  text-decoration: underline;
}

.comments-area .comment-content {
  line-height: 1.5;
  font-size: 0.95rem;
}

.comments-area .comment-content p {
  margin: 0;
}

.comments-area .comment-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #65676b;
  margin-top: 0.25rem;
}

.comments-area .comment-actions a,
.comments-area .comment-actions .edit-link {
  text-decoration: none;
  color: #65676b;
  font-weight: 600;
}
.comments-area .comment-actions a:hover {
  text-decoration: underline;
}

.comments-area .comment-actions .reply,
.comments-area .comment-actions .edit-link {
  position: relative;
}

/* Add separator dot */
.comments-area .comment-actions .reply::before,
.comments-area .comment-actions .edit-link::before {
  content: "·";
  margin-right: 0.75rem;
  color: #65676b;
  font-weight: bold;
}
.comments-area .comment-actions .comment-metadata + .reply::before,
.comments-area .comment-actions .reply + .edit-link::before {
  /* The above styles should handle this, but can be used for specificity */
}

/* Comment Form */
.comments-area .comment-form {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.comments-area .comment-form-comment textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s;
  /* Auto-grow styles */
  resize: none;
  overflow-y: hidden;
  height: auto; /* Start at auto */
  min-height: 50px; /* Set a smaller initial height */
}

.comments-area .comment-form-comment textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.comments-area .form-submit input#submit {
  background-color: #2c3e50;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.comments-area .form-submit input#submit:hover {
  background-color: #34495e;
}

.comments-area .logged-in-as {
  font-size: 0.9rem;
  color: #7f8c8d;
}

/* Styles for Share/Revoke buttons on Trip page, matching WP default/reference */
.share-with-this-trip-button,
.revoke-from-this-trip-button {
  margin-left: 6px; /* Add a small gap to the left of the button */
  display: inline-block;
  text-decoration: none;
  font-size: 13px;
  line-height: 2.15384615;
  min-height: 30px;
  padding: 0 10px;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  -webkit-appearance: none;
  border-radius: 3px;
  white-space: nowrap;
  box-sizing: border-box;

  /* Default state (like "Download" or "Share") */
  background: #f6f7f7;
  border-color: #0071a1;
  color: #0071a1;
  border-color: #dcdcde;
  color: #3c434a;
  box-shadow: none;
}

.share-with-this-trip-button:hover,
.revoke-from-this-trip-button:hover,
.share-with-this-trip-button:focus,
.revoke-from-this-trip-button:focus {
  background: #f0f0f1;
  border-color: #8c8f94;
  color: #222426;
}

/* Specific override for Revoke button to give it a destructive hint */
.revoke-from-this-trip-button {
  color: #d63638;
  border-color: #d63638;
}

.revoke-from-this-trip-button:hover,
.revoke-from-this-trip-button:focus {
  color: #fff;
  background-color: #d63638;
  border-color: #d63638;
}

.share-with-this-trip-button:disabled,
.revoke-from-this-trip-button:disabled,
.share-with-this-trip-button[disabled],
.revoke-from-this-trip-button[disabled] {
  color: #a7aaad !important;
  border-color: #dcdcde !important;
  background: #f6f7f7 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  cursor: not-allowed;
  opacity: 1; /* Override my previous opacity setting */
}

.comment-form-flex .comment-form-field {
  flex-grow: 1;
}

/* Map container */
.activity-map-container {
  background-color: #f0f0f0;
  padding: 1rem;
  margin-top: 0;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  display: none !important;
}

.activity-map-container.show {
  display: block !important;
}
.address-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.copy-address-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.copy-address-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.copy-address-button:hover,
.love-button:hover,
.comment-button:hover,
.social-map .map-button:hover {
  color: #000;
}

.map-iframe-wrapper {
  border-radius: 8px;
  overflow: hidden;
}
.social-map .map-button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #666;
}
.social-map .map-button:hover {
  color: #000;
}

.social-map {
  margin-left: auto;
}

.social-share {
  display: flex;
  align-items: center;
}

.social-share .share-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.social-share .share-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.social-share .share-button:hover {
  color: #000;
}

/* Activity Header Right */
.activity-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.edit-activity-button {
  padding: 0.25rem;
  border-radius: 4px;
  color: #666;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.edit-activity-button:hover {
  color: #333;
  background-color: #f5f5f5;
}

.edit-activity-button svg {
  width: 18px;
  height: 18px;
}

/* Trip Edit Button */
.trip-edit-button-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.edit-trip-button {
  padding: 0.5rem;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.edit-trip-button:hover {
  color: white;
  background-color: rgba(0, 0, 0, 0.6);
  transform: scale(1.05);
}

.edit-trip-button svg {
  width: 20px;
  height: 20px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.button-primary {
  background-color: #0073aa;
  color: white;
  padding: 0.75rem 1.5rem;
  border: 1px solid #0073aa;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.2;
  display: inline-block;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

.button-primary:hover {
  background-color: #005a87;
  border-color: #005a87;
  color: white;
}

.button-secondary {
  background-color: #f8f9fa;
  color: #495057;
  padding: 0.75rem 1.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.2;
  display: inline-block;
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.button-secondary:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
}

.button-danger {
  background-color: #dc3545;
  color: white;
  padding: 0.75rem 1.5rem;
  border: 1px solid #dc3545;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.2;
  display: inline-block;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

.button-danger:hover {
  background-color: #c82333;
  border-color: #c82333;
}

.button-neutral {
  background-color: #6c757d;
  color: white;
  padding: 0.75rem 1.5rem;
  border: 1px solid #6c757d;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.2;
  display: inline-block;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

.button-neutral:hover {
  background-color: #5a6268;
  border-color: #5a6268;
  color: white;
}

.button-secondary {
  background-color: #6b7280;
  color: white;
  padding: 0.75rem 1.5rem;
  border: 1px solid #6b7280;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.2;
  display: inline-block;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

.button-secondary:hover {
  background-color: #4b5563;
  border-color: #4b5563;
  color: white;
}

.button-secondary:disabled {
  background-color: #9ca3af;
  border-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Edit Activity Page */
.wp-travel-plus-edit-activity-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

/* Media Preview Components */
.media-preview {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.preview-image {
  margin-bottom: 0.5rem;
}

.preview-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.preview-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.button-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Gallery Preview */
.gallery-preview .preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.gallery-preview .preview-item {
  text-align: center;
}

.gallery-preview .preview-image {
  margin-bottom: 0.5rem;
}

.gallery-preview .preview-image img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

/* Documents Preview */
.documents-preview .preview-list {
  margin-bottom: 1rem;
}

.documents-preview .document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: white;
}

.documents-preview .document-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.documents-preview .document-icon {
  font-size: 1.5rem;
}

.documents-preview .document-details {
  display: flex;
  flex-direction: column;
}

.documents-preview .document-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.documents-preview .document-size {
  color: #666;
  font-size: 0.875rem;
}

/*--------------------------------------------------------------
7.0 Trip Archive Profile Sections
--------------------------------------------------------------*/

/* Profile sections in trip archive */
.wp-travel-plus-trip-archive .profile-section {
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.wp-travel-plus-trip-archive .profile-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #0d2b4f;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

/* Profile header */
.wp-travel-plus-trip-archive .profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.wp-travel-plus-trip-archive .profile-avatar {
  flex-shrink: 0;
}

.wp-travel-plus-trip-archive .profile-avatar img {
  border-radius: 50%;
  width: 150px;
  height: 150px;
  object-fit: cover;
}

.wp-travel-plus-trip-archive .profile-info h3 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  color: #0d2b4f;
}

.wp-travel-plus-trip-archive .profile-info p {
  margin: 0;
  color: #666;
  font-size: 1rem;
}

/* Bio section */
.wp-travel-plus-trip-archive .bio-display {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

/* Stats grid */
.wp-travel-plus-trip-archive .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
  width: 100%;
  max-width: 100%;
}

.wp-travel-plus-trip-archive .stat-item {
  text-align: center;
  padding: 1.5rem;
}

.wp-travel-plus-trip-archive .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #1a73e8;
  margin-bottom: 0.5rem;
}

.wp-travel-plus-trip-archive .stat-label {
  display: block;
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Map section */
.wp-travel-plus-trip-archive .wp-travel-plus-map-container {
  height: 400px;
  margin: 1rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.wp-travel-plus-trip-archive .countries-display {
  margin-top: 1rem;
}

.wp-travel-plus-trip-archive .country-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.wp-travel-plus-trip-archive .country-badge {
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Trips section */
.wp-travel-plus-trip-archive .trips-section {
  margin-top: 3rem;
}

.wp-travel-plus-trip-archive .trips-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #0d2b4f;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

/* Travel Buddies Section */
.wp-travel-plus-trip-archive .section-heading-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.wp-travel-plus-trip-archive .section-heading-wrapper h2 {
  margin: 0;
  flex: 1;
}

.wp-travel-plus-trip-archive .view-all-link {
  font-size: 0.875rem;
  color: #666;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-left: 1rem;
}

.wp-travel-plus-trip-archive .view-all-link:hover {
  color: #3b82f6;
  background-color: #f8f9fa;
  text-decoration: none;
}

.wp-travel-plus-trip-archive .companion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.wp-travel-plus-trip-archive .companion-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background-color 0.2s ease-in-out;
}

.wp-travel-plus-trip-archive .companion-item a:hover {
  background-color: #f8f9fa;
}

.wp-travel-plus-trip-archive .companion-item .avatar {
  border-radius: 50%;
  width: 60px;
  height: 60px;
}

.wp-travel-plus-trip-archive .companion-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: #333;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .wp-travel-plus-trip-archive .trip-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }
}

/* Gallery responsive adjustments */
@media (max-width: 768px) {
  .activity-gallery-unified.gallery-count-4 {
    max-height: 350px; /* Slightly smaller on mobile */
  }

  .activity-gallery-unified.gallery-count-5,
  .activity-gallery-unified.gallery-count-5-plus {
    grid-template-rows: 250px 150px; /* Smaller on mobile */
  }
}

@media (max-width: 768px) {
  .wp-travel-plus-trip-archive .trip-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .wp-travel-plus-trip-archive .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .wp-travel-plus-trip-archive .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .wp-travel-plus-trip-archive .profile-avatar img {
    width: 120px;
    height: 120px;
  }

  .wp-travel-plus-trip-archive .stat-number {
    font-size: 1.5rem;
  }

  .wp-travel-plus-trip-archive .wp-travel-plus-map-container {
    height: 300px;
  }

  .wp-travel-plus-travel-map .country-badge-list {
    gap: 0.25rem;
  }

  .wp-travel-plus-travel-map .country-badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .wp-travel-plus-travel-map .country-display-flags .country-flag {
    width: 16px;
    height: 12px;
  }

  .wp-travel-plus-travel-map .country-flag-only {
    width: 24px;
    height: 18px;
  }

  .wp-travel-plus-travel-map .country-flags-only {
    gap: 0.25rem;
  }
}

/*--------------------------------------------------------------
8.0 Individual Shortcodes
--------------------------------------------------------------*/

/* Travel Statistics Shortcode */
.wp-travel-plus-travel-stats {
  width: 100%;
}

.wp-travel-plus-travel-stats .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
}

.wp-travel-plus-travel-stats .stat-item {
  text-align: center;
  padding: 1.5rem;
}

.wp-travel-plus-travel-stats .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #3b82f6;
  margin-bottom: 0.5rem;
}

.wp-travel-plus-travel-stats .stat-label {
  display: block;
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Travel Map Shortcode */
.wp-travel-plus-travel-map {
  width: 100%;
}

.wp-travel-plus-travel-map .wp-travel-plus-map-container {
  width: 100%;
  height: 400px;
  margin: 1rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.wp-travel-plus-travel-map .countries-display {
  margin-top: 1rem;
}

.wp-travel-plus-travel-map .country-badge-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wp-travel-plus-travel-map .country-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  background: #3b82f6;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Country display modes */
.wp-travel-plus-travel-map .country-display-flags .country-badge {
  background: #f8f9fa;
  color: #333;
  border: 1px solid #dee2e6;
}

.wp-travel-plus-travel-map .country-display-flags .country-flag {
  width: 20px;
  height: 15px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* Flags-only display mode */
.wp-travel-plus-travel-map .country-flags-only {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.wp-travel-plus-travel-map .country-flag-only {
  width: 32px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.wp-travel-plus-travel-map .country-flag-only:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Fallback for countries without flags */
.wp-travel-plus-travel-map
  .country-display-flags
  .country-flag:not([style*="background-image"]),
.wp-travel-plus-travel-map .country-display-flags .country-flag.flag-error,
.wp-travel-plus-travel-map .country-flag-only:not([style*="background-image"]),
.wp-travel-plus-travel-map .country-flag-only.flag-error {
  background: #e9ecef;
  border: 1px solid #dee2e6;
  position: relative;
}

.wp-travel-plus-travel-map
  .country-display-flags
  .country-flag:not([style*="background-image"])::after,
.wp-travel-plus-travel-map
  .country-display-flags
  .country-flag.flag-error::after,
.wp-travel-plus-travel-map
  .country-flag-only:not([style*="background-image"])::after,
.wp-travel-plus-travel-map .country-flag-only.flag-error::after {
  content: "?";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #6c757d;
  font-weight: bold;
}

.wp-travel-plus-travel-map .country-display-flags .country-name {
  font-size: 0.85rem;
}

.wp-travel-plus-travel-map .country-display-badges .country-badge {
  background: #3b82f6;
  color: white;
}

.wp-travel-plus-travel-map .country-display-badges .country-name {
  font-weight: 500;
}

/* Travel Buddies Shortcode */
.wp-travel-plus-travel-buddies {
  width: 100%;
}

.wp-travel-plus-travel-buddies .companion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.wp-travel-plus-travel-buddies .companion-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: background-color 0.2s ease-in-out;
}

.wp-travel-plus-travel-buddies .companion-item a:hover {
  background-color: #f8f9fa;
}

.wp-travel-plus-travel-buddies .companion-item .avatar {
  border-radius: 50%;
  width: 60px;
  height: 60px;
}

.wp-travel-plus-travel-buddies .companion-name {
  font-weight: 500;
  font-size: 0.9rem;
  color: #333;
}

/* Upcoming Trip Shortcode */
.wp-travel-plus-upcoming-trip {
  width: 100%;
}

.wp-travel-plus-upcoming-trip h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #0d2b4f;
  font-weight: 600;
}

.wp-travel-plus-upcoming-trip .trip-card {
  margin: 0;
  max-width: 100%;
}

.wp-travel-plus-upcoming-trip .no-trips-cta {
  text-align: center;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px dashed #dee2e6;
}

.wp-travel-plus-upcoming-trip .no-trips-cta h3 {
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.wp-travel-plus-upcoming-trip .no-trips-cta p {
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.wp-travel-plus-upcoming-trip .cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s ease-in-out;
}

.wp-travel-plus-upcoming-trip .cta-button:hover {
  background: #2563eb;
  color: white;
  text-decoration: none;
}

/* Responsive adjustments for individual shortcodes */
@media (max-width: 768px) {
  .wp-travel-plus-travel-stats .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .wp-travel-plus-travel-stats .stat-number {
    font-size: 1.5rem;
  }

  .wp-travel-plus-travel-map .wp-travel-plus-map-container {
    height: 300px;
  }

  .wp-travel-plus-travel-buddies .companion-list {
    gap: 0.75rem;
  }

  .wp-travel-plus-travel-buddies .companion-item a {
    padding: 0.5rem;
  }

  .wp-travel-plus-travel-buddies .companion-item .avatar {
    width: 50px;
    height: 50px;
  }
}

/* Lazy Loading Styles */
.lazy-image-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.lazy-loading {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.lazy-loaded {
  opacity: 1;
}

/* Ensure images are visible by default */
.activity-gallery-unified img {
  opacity: 1 !important;
  display: block !important;
}

.lazy-image-placeholder {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
  border-radius: 4px;
}

/* Activity Virtual Scrolling */
.activity-virtual-container {
  position: relative;
  min-height: 200px; /* Minimum height to prevent layout shift */
}

.activity-virtual-spacer {
  height: 100%;
  pointer-events: none;
}

.activity-virtual-item {
  transition: opacity 0.2s ease-in-out;
}

.activity-virtual-item.loading {
  opacity: 0.6;
}

/* Performance optimizations */
.activity-gallery-unified img {
  will-change: transform; /* Optimize for hover effects */
}

.activity-gallery-unified .wtp-gallery-item {
  contain: layout style paint; /* CSS containment for better performance */
}

/* Intersection Observer fallback */
.no-intersection-observer .lazy-image-placeholder {
  display: none;
}

.no-intersection-observer img {
  opacity: 1;
}

/*--------------------------------------------------------------
Trip Photos Mosaic Gallery
--------------------------------------------------------------*/
.trip-photos-mosaic {
  margin-top: 1rem;
}

.trip-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  width: 100%;
}

.trip-photo-item {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  background: #f3f4f6;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trip-photo-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: translateY(10px);
}

.trip-photo-item:hover .photo-overlay {
  opacity: 1;
  transform: translateY(0);
}

.photo-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-activity {
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive adjustments for trip photos */
@media (max-width: 768px) {
  .trip-photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }
  
  .photo-overlay {
    padding: 8px;
  }
  
  .photo-title {
    font-size: 12px;
  }
  
  .photo-activity {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .trip-photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px;
  }
}

/*--------------------------------------------------------------
Trip Chat Interface
--------------------------------------------------------------*/
.trip-chat-container {
  display: flex;
  flex-direction: column;
}

.chat-messages {
  padding: 1rem 0;
}

.chat-message-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

.chat-message:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chat-message-avatar {
  flex-shrink: 0;
}

.chat-message-avatar img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.chat-message-content {
  flex: 1;
  min-width: 0;
}

.chat-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.chat-message-user {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px !important;
}

.chat-message-timestamp {
  font-size: 12px !important;
  color: #95a5a6 !important;
}

.chat-message-body {
  color: #34495e;
  line-height: 1.5;
}

/* Love messages */
.chat-message-love {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  flex-wrap: nowrap !important;
}

.love-icon {
  font-size: 16px !important;
  flex-shrink: 0 !important;
}

.love-text {
  color: #7f8c8d !important;
  font-style: italic !important;
  white-space: nowrap !important;
}

/* Comment messages */
.chat-message-comment {
  display: flex !important;
  gap: 12px !important;
  padding: 12px !important;
}

.comment-context {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 14px !important;
  color: #2c3e50 !important;
  margin-bottom: 8px !important;
  flex-wrap: nowrap !important;
}

.comment-context-text {
  font-style: italic !important;
  color: #7f8c8d !important;
  white-space: nowrap !important;
}

.comment-content {
  background: #f8f9fa !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  border-left: 3px solid #6c757d !important;
  font-style: italic !important;
  color: #495057 !important;
  margin-top: 0 !important;
  font-size: 13px !important;
}

/* Trip comment messages */
.chat-message-trip-comment {
  display: flex !important;
  gap: 12px !important;
  padding: 12px !important;
}

.chat-message-trip-comment .comment-content {
  background: #f8f9fa;
  border-left-color: #6c757d;
}

/* Comment type badges */
.comment-type-badge {
  display: inline-block !important;
  flex-shrink: 0 !important;
  border-radius: 4px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 2px 6px !important;
  margin-right: 4px !important;
}

/* Mention system */
.mention-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  min-width: 200px;
}

.mention-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s ease;
}

.mention-item:hover {
  background-color: #f8f9fa;
}

.mention-item:last-child {
  border-bottom: none;
}

/* Mention highlighting in comments */
.comment-content .mention {
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
}

/* Reply indicator */
.chat-message-reply {
  position: relative;
  margin-left: 20px;
}

.chat-message-reply::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ddd;
}

.chat-message-reply .comment-content {
  background: #f8f9fa;
  border-left-color: #6c757d;
  font-size: 13px;
}

.reply-indicator {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 4px;
  font-style: italic;
}

.reply-link {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.reply-link:hover {
  text-decoration: underline;
}

/* Attachment messages */
.chat-message-attachment {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  flex-wrap: nowrap !important;
}

.attachment-icon {
  font-size: 16px !important;
  flex-shrink: 0 !important;
}

.attachment-text {
  color: #7f8c8d !important;
  font-style: italic !important;
  white-space: nowrap !important;
}

.attachment-name {
  color: #2ecc71 !important;
  font-weight: 500 !important;
}

.attachment-context {
  color: #7f8c8d !important;
  font-style: italic !important;
  white-space: nowrap !important;
}

/* Document messages */
.chat-message-document {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  flex-wrap: nowrap !important;
}

.document-icon {
  font-size: 16px !important;
  flex-shrink: 0 !important;
}

.document-text {
  color: #7f8c8d !important;
  font-style: italic !important;
  white-space: nowrap !important;
}

.document-name {
  color: #9b59b6 !important;
  font-weight: 500 !important;
}

.document-context {
  color: #7f8c8d !important;
  font-style: italic !important;
  white-space: nowrap !important;
}

/* Activity links */
.chat-message-activity-link {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.chat-message-activity-link:hover {
  text-decoration: underline;
}

/* Reply functionality */
.chat-message-actions {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.reply-button {
  background: none;
  border: 1px solid #ddd;
  color: #666;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reply-button:hover {
  background: #f8f9fa;
  border-color: #3498db;
  color: #3498db;
}

.reply-form {
  margin-top: 8px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.reply-form textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 8px;
}

.reply-form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.reply-submit-button {
  background: #3498db;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.reply-cancel-button {
  background: #6c757d;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

/* Chat input */
.chat-input-container {
  border-top: 1px solid #e9ecef;
  background: white;
  padding: 1rem;
}

.chat-input-form {
  width: 100%;
}

.chat-form {
  margin: 0;
}

/* Reply form styling to match chat form */
.reply-form {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.reply-form .chat-form {
  background: transparent;
  border: none;
  padding: 0;
}

.reply-form .chat-input-wrapper {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px;
}

/* Activity comment threading spacing */
.comment-list li {
  margin-bottom: 20px;
}

.comment-list li.comment-reply {
  margin-bottom: 15px;
  margin-left: 30px;
  border-left: 2px solid #e9ecef;
  padding-left: 15px;
}

.comment-list li.comment-reply .comment-author-name {
  font-size: 14px;
}

.comment-list li.comment-reply .reply-indicator {
  font-size: 12px;
  color: #6c757d;
  margin-left: 8px;
  font-style: italic;
}

/* Consolidated Comment System */
.consolidated-comment-system {
  margin-top: 20px;
}

.consolidated-comment-system .comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.consolidated-comment-system .comment-list li {
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}

.consolidated-comment-system .comment-list li:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.consolidated-comment-system .comment-list li.comment-reply {
  margin-left: 20px;
  margin-bottom: 12px;
  background: #ffffff; /* Same as parent comment */
  border: 1px solid #e1e5e9;
  border-top: 1px solid #e9ecef; /* Top border for separation */
}

/* Style for reply items rendered as divs */
.consolidated-comment-system .comment-replies .consolidated-comment {
  margin-bottom: 12px;
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid #e9ecef;
  border-radius: 0;
  box-shadow: none;
}

.consolidated-comment-system .comment-avatar {
  flex-shrink: 0;
  margin-right: 12px;
}

.consolidated-comment-system .comment-main {
  flex: 1;
  min-width: 0;
}

.consolidated-comment-system .comment-author-name {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 15px;
  color: #2c3e50;
}

.consolidated-comment-system .comment-content {
  margin-bottom: 10px;
  line-height: 1.5;
  font-size: 16px !important;
  color: #34495e;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-style: normal !important;
  margin-top: 0 !important;
}

.consolidated-comment-system .comment-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #6c757d;
}

.consolidated-comment-system .comment-actions .reply-button {
  background: none;
  border: none;
  color: #007cba;
  cursor: pointer;
  text-decoration: underline;
  font-size: 13px;
  font-weight: 500;
}

.consolidated-comment-system .comment-actions .reply-button:hover {
  color: #005a87;
}

.consolidated-comment-system .comment-form-container {
  margin-top: 20px;
}

.consolidated-comment-system .comment-restricted {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-align: center;
  color: #6c757d;
}

/* Event Filters */
.consolidated-comment-system .event-filters {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.consolidated-comment-system .filter-label {
  font-weight: 600;
  margin-bottom: 10px;
  color: #495057;
  font-size: 14px;
}

.consolidated-comment-system .filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.consolidated-comment-system .filter-btn {
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  background: #ffffff;
  color: #6c757d;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.consolidated-comment-system .filter-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #495057;
}

.consolidated-comment-system .filter-btn.active {
  background: #007cba;
  border-color: #007cba;
  color: #ffffff;
}

/* Chat Events */
.consolidated-comment-system .chat-event {
  margin-bottom: 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.consolidated-comment-system .chat-event:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.consolidated-comment-system .event-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.consolidated-comment-system .event-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e3f2fd;
  border-radius: 50%;
  color: #1976d2;
}

.consolidated-comment-system .event-icon .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.consolidated-comment-system .event-message {
  flex: 1;
  min-width: 0;
}

.consolidated-comment-system .event-text {
  display: block;
  font-size: 14px;
  color: #495057;
  font-weight: 500;
  margin-bottom: 2px;
}

.consolidated-comment-system .event-time {
  display: block;
  font-size: 12px;
  color: #6c757d;
  font-style: italic;
}

.consolidated-comment-system .activity-event-link {
  color: #007cba;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.consolidated-comment-system .activity-event-link:hover {
  color: #005a87;
  border-bottom-color: #005a87;
}

.consolidated-comment-system .comment-context {
  font-size: 12px;
  color: #6c757d;
  font-weight: normal;
  margin-left: 8px;
}

.consolidated-comment-system .activity-comment-link {
  color: #007cba;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.consolidated-comment-system .activity-comment-link:hover {
  color: #005a87;
  border-bottom-color: #005a87;
}

/* Event type specific styling */
.consolidated-comment-system .chat-event[data-event-type="activity_created"] .event-icon {
  background: #e8f5e8;
  color: #2e7d32;
}

.consolidated-comment-system .chat-event[data-event-type="photo_uploaded"] .event-icon {
  background: #fff3e0;
  color: #f57c00;
}

.consolidated-comment-system .chat-event[data-event-type="document_uploaded"] .event-icon {
  background: #f3e5f5;
  color: #7b1fa2;
}

.consolidated-comment-system .chat-event[data-event-type="activity_loved"] .event-icon {
  background: #fce4ec;
  color: #c2185b;
}

.consolidated-comment-system .chat-event[data-event-type="trip_created"] .event-icon {
  background: #e1f5fe;
  color: #0277bd;
}

.consolidated-comment-system .chat-event[data-event-type="trip_started"] .event-icon {
  background: #e8f5e8;
  color: #388e3c;
}

/* Reply form styling */
.consolidated-comment-system .reply-form {
  margin-top: 12px;
  padding: 16px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.consolidated-comment-system .reply-form .chat-form {
  background: transparent;
  border: none;
  padding: 0;
}

.consolidated-comment-system .reply-form .chat-input-wrapper {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Mention dropdown */
.mention-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.mention-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.mention-item:hover,
.mention-item.active {
  background-color: #f8f9fa;
}

.mention-item:last-child {
  border-bottom: none;
}

.mention-item div:first-child {
  font-weight: 500;
}

.mention-item div:last-child {
  font-size: 12px;
  color: #666;
}

.chat-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: stretch;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 8px;
}

.chat-input-wrapper textarea {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  padding: 12px 16px;
  border: none;
  border-radius: 6px;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  background: white;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.chat-input-wrapper textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.chat-send-button {
  background: #007cba;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.chat-send-button:hover {
  background: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-send-button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

/* Empty state */
.chat-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #7f8c8d;
}

.chat-empty-state p {
  margin: 0 0 1rem 0;
  font-size: 16px;
}

/* Responsive adjustments for chat */
@media (max-width: 768px) {
  .chat-message-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .chat-input-wrapper {
    flex-direction: column;
    gap: 12px;
  }
  
  .chat-send-button {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .chat-messages {
    padding: 0.5rem 0;
  }
  
  .chat-input-container {
    padding: 0.5rem;
  }
}
