/* Global styling for ShareMyLuggageSpace */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  /* Use the travel photo as the page background with a dark overlay for readability. */
  /* Soften the dark overlay slightly to allow more of the underlying
     travel photo to shine through. A lower alpha on the gradient
     produces a brighter overall look while still keeping text legible. */
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('assets/pexels-freestockpro-1008155.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* Use a near‑white foreground colour globally so text remains legible on the dark background. */
  color: #f5f5f5;
}

a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
}

header h1 i {
  margin-right: 8px;
  color: #3b82f6;
}

/* Brand text styling: beach-inspired gradient and cursive font */
.brand-text {
  font-family: 'Pacifico', cursive;
  font-size: 1.8rem;
  /* For the dark theme we drop the colourful gradient and use a solid light colour. */
  color: #f5f5f5;
  /* Remove background clipping because we are not using a gradient. */
  background: none;
}

/* Weight group: display input and select inline */
.weight-group {
  display: flex;
  gap: 8px;
}

/* Item rows styling */
.item-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.item-row label {
  width: 100%;
}
.item-row input {
  flex: 1;
  min-width: 120px;
  background: #1f2937;
  border: 1px solid #374151;
  color: #e5e7eb;
}

/* Logo used in the header */
.logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-right: 10px;
}

/* Small avatar displayed in the header navigation for logged-in users */
.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: 12px;
  border: 2px solid #374151;
}

/* Greeting text shown next to the avatar */
.user-greeting {
  margin-left: 10px;
  font-weight: 500;
  color: #a1a1aa;
}

header nav a {
  margin-left: 20px;
  font-weight: 500;
  transition: color 0.2s ease;
  color: #f5f5f5;
}

header nav a:hover {
  color: #60a5fa;
}

.container {
  max-width: 960px;
  margin: 40px auto 60px;
  padding: 20px;
  /* Dark container with a subtle transparency and soft shadow for depth */
  /* Lighten the card backdrop so the dark photo doesn’t overwhelm
     the content. We reduce the opacity of the dark layer here */
  background: rgba(31, 41, 55, 0.75);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  color: #e5e7eb;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #374151;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #1f2937;
  color: #e5e7eb;
}

.form-group textarea {
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  /* Dark theme button gradient: violet to indigo for a sophisticated accent */
  background: linear-gradient(135deg, #6d28d9 0%, #3b82f6 100%);
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

/* Quick search form inside hero */
.quick-search {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.quick-search input[type="text"] {
  padding: 8px;
  border: 1px solid #374151;
  border-radius: 4px;
  font-size: 0.9rem;
  background: #1f2937;
  color: #e5e7eb;
}
.quick-search .btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.card {
   background: #1f2937;
   border-radius: 12px;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
   border: 1px solid #374151;
   padding: 20px;
   margin-bottom: 24px;
   color: #e5e7eb;
}

/* Listing card specific styles to add a splash of colour */
.listing-card {
  /* Subtle dark gradient for listing cards */
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.95) 100%);
  border: 1px solid #374151;
  /* Prepare for fade-in animation */
  opacity: 0;
  transform: translateY(10px);
  color: #e5e7eb;
}

/* Header section within a listing card. Displays the user's avatar, name and the flight date */
.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #374151;
}
.user-avatar-lg {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #374151;
}

/* Rating sections styling */
.rating-section {
  margin-top: 20px;
  padding: 15px;
  background: rgba(31, 41, 55, 0.9);
  border: 1px solid #374151;
  border-radius: 8px;
  color: #e5e7eb;
}
.rating-section h4 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.rating-form label {
  display: block;
  margin-top: 8px;
  font-weight: 500;
}
.rating-form select,
  .rating-form textarea {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #374151;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
  background: #1f2937;
  color: #e5e7eb;
}

/* Star rating dropdown styling.  Use larger font size and monospace alignment
   so that Unicode star characters (★ and ☆) appear aligned.  */
.star-select {
  font-size: 1.2rem;
  line-height: 1.4rem;
  letter-spacing: 1px;
  font-family: 'Inter', sans-serif;
  color: #e5e7eb;
}
.star-select option {
  font-size: 1.2rem;
  font-family: 'Inter', sans-serif;
}
.rating-form textarea {
  resize: vertical;
}
.rating-info {
  margin-top: 10px;
  font-style: italic;
  color: #9ca3af;
}
.user-name {
  font-weight: 600;
  color: #e5e7eb;
}
.posted-date {
  display: block;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 2px;
}
.listing-date-bold {
  font-weight: 700;
  color: #60a5fa;
  font-size: 1rem;
}
.listing-date {
  font-size: 0.9rem;
  color: #9ca3af;
  font-weight: 500;
}

/* Explore button styling – similar to primary buttons but with a different colour gradient */
.explore-btn {
  margin-top: 16px;
  background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  color: #fff;
}

/* Smaller button variant for actions within listings */
.btn-sm {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  /* Secondary button gradient: emerald to sky blue */
  background: linear-gradient(135deg, #059669 0%, #3b82f6 100%);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  margin-right: 10px;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  text-decoration: none;
}

.btn-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.btn-danger {
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
}

/* Quote styling */
.quote {
  margin: 20px 0;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid #6366f1;
  font-style: italic;
  color: #d1d5db;
  border-radius: 8px;
}

/* Hero section styling */
.hero {
  max-width: 960px;
  margin: 60px auto 30px;
  padding: 60px 20px;
  text-align: center;
  /* Dark hero background with subtle gradient */
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  color: #e5e7eb;
}

.hero h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5em;
  font-weight: 700;
  color: #f3f4f6;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 1.5em;
  color: #a1a1aa;
}

.hero .btn {
  font-size: 1.1rem;
  padding: 14px 32px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.search-bar {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.search-bar input {
  flex: 1;
  background: #1f2937;
  border: 1px solid #374151;
  color: #e5e7eb;
  padding: 10px;
}

.message {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
}

.message.success {
  background-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}

.message.error {
  background-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* Warning messages (e.g. inactivity reminders) */
.message.warning {
  background-color: rgba(252, 211, 77, 0.2);
  color: #ca8a04;
  border: 1px solid #fbbf24;
}

/*
 * Chat components styling
 *
 * The chat feature allows a listing owner and interested users to exchange
 * messages directly on the site without revealing personal email addresses.
 * These classes create a simple but colorful chat interface with
 * differentiated inbound and outbound bubbles.
 */
.chat-container {
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(31, 41, 55, 0.9);
  border-radius: 12px;
  border: 1px solid #374151;
  color: #e5e7eb;
}
.message-bubble {
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 20px;
  display: inline-block;
  max-width: 80%;
  word-wrap: break-word;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.message-bubble.in {
  background: linear-gradient(135deg, #27272a 0%, #3f3f46 100%);
  color: #a5b4fc;
  align-self: flex-start;
}
.message-bubble.out {
  background: linear-gradient(135deg, #1e40af 0%, #312e81 100%);
  color: #c7d2fe;
  align-self: flex-end;
  margin-left: auto;
}
.chat-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #374151;
  border-radius: 8px;
  resize: vertical;
  font-size: 1rem;
  background: #1f2937;
  color: #e5e7eb;
}
.conversation-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.conversation-list li {
  margin-bottom: 8px;
}
.conversation-list a {
  color: #60a5fa;
  font-weight: 500;
}

/* Item list styling within listing details */
.item-list {
  margin: 0 0 10px 20px;
  padding: 0;
  list-style: disc;
  color: #a1a1aa;
  font-size: 0.95rem;
}
.item-list li {
  margin-bottom: 4px;
}

/* Animation for listing cards */
.listing-card.animate {
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* About page specific styling */
.about-content h2 {
  margin-top: 0;
  font-size: 2rem;
  color: #e5e7eb;
}
.about-content p {
  line-height: 1.6;
  color: #d1d5db;
  margin-bottom: 15px;
}
.highlight {
  color: #8b5cf6;
  font-weight: 600;
}

/* Additional highlight styles for the About page */
.highlight-name {
  color: #10b981;
  font-weight: 700;
}
.highlight-tagline {
  color: #f43f5e;
  font-weight: 600;
}
.about-content .subheading {
  font-size: 1.4rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #818cf8;
  font-weight: 600;
}

/* Small helper text */
.small-text {
  font-size: 0.9rem;
  color: #9ca3af;
  margin-top: -5px;
  margin-bottom: 10px;
}

/* Contact page styling */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Dark gradient for the contact info panel to match the overall theme */
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #374151;
  color: #e5e7eb;
}
.contact-info p {
  margin: 0;
  color: #d1d5db;
  font-size: 1.05rem;
}
.contact-info a {
  color: #60a5fa;
  font-weight: 600;
}

/* Earnings summary styling */
.earnings-summary {
  margin-top: 30px;
  background: rgba(31, 41, 55, 0.5);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #374151;
  color: #d1d5db;
}
.earnings-summary h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: #a78bfa;
}
.earnings-list {
  list-style: disc;
  margin-left: 20px;
}
.earnings-list li {
  margin-bottom: 4px;
}

/*
 * Shipments summary styling. This section displays lists of shipments
 * the user is sending or carrying. The colors and spacing are
 * consistent with the dark theme of the site.
 */
.shipments-summary {
  margin-top: 20px;
}

.shipments-summary h3,
.shipments-summary h4 {
  margin-top: 10px;
  color: #d1d5db;
}

.shipments-list {
  list-style: disc;
  margin-left: 20px;
  color: #9ca3af;
}

.shipments-list li {
  margin-bottom: 6px;
}

/* Disclaimer styling for price conversions */
.disclaimer {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 4px;
}

/* Price information styling for listing cards */
.price-info {
  margin: 4px 0 8px 0;
  font-size: 0.9rem;
  color: #d1d5db;
}
.price-info .original-price {
  text-decoration: line-through;
  color: #6b7280;
  margin-right: 4px;
}
.price-info .discount-price {
  font-weight: 600;
  color: #10b981;
}
.price-info .smiley {
  margin-left: 4px;
}
