body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
}

mark {
  display: block;
  background-color: #7ac6d2;
  color: black;
  font-weight: bold;
  margin: 0 -20px;  /* cancel out the container's left/right padding */
  padding: 10px 20px; /* add its own padding */
}


/* Header styling */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #007bff;
  color: white;
  padding: 8px 15px;
  z-index: 2000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px; /* spacing between logo and text */
}

.header h2 {
  margin: 0;
  font-size: 20px;
}

.logo-img {
  height: 100%;   /* fills the header’s height */
  width: auto;    /* keeps aspect ratio */
  max-height: 50px;
}
.app-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
}

.app-name {
  font-size: 18px;
  font-weight: bold;
  margin: 0;
  color: #ffffff; /* White text so it's visible on blue background */
}

.app-motto {
  font-size: 12px;
  margin: 0;
  color: #e0e0e0; /* Light gray for contrast */
}
/* --- Warning banner --- */
.warning-banner {
  background-color: #fff3cd;
  color: #856404;
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid #ffeeba;
}


/* Hamburger button */
.menu-btn {
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* Dropdown menu styling */
.menu-container {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; /* directly below the button */
  right: 0;  /* align right side */
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  min-width: 150px;
  z-index: 1000;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-10px);
  opacity: 0;
}

.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #007bff;
}

.dropdown-menu a:hover {
  background: #f0f0f0;
}

/* Show menu when active */
.dropdown-menu.show {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

/* Submenu headers */
.submenu-header {
  font-size: 13px;
  font-weight: bold;
  color: #666;
  margin-top: 10px;
  margin-bottom: 4px;
  padding-left: 12px;
  text-transform: uppercase;
}
/* Container for the main content */
.container {
  max-width: 800px;
  margin: 50px auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h2 {
  text-align: center;
}

/* Form inputs */
form input, form select {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 14px 10px;
  font-size: 16px;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Main login button - full width */
form button#loginBtn, form button#registerEmailBtn, form button#sendResetEmailBtn, 
form button#updatePasswordBtn, form button#changePasswordBtn {
  display: block;
  width: 100%;
  padding: 14px 0;
  font-size: 16px;
  background-color: #007bff;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  margin: 10px 0;
}

form button#loginBtn:hover, form button#registerEmailBtn:hover, form button#sendResetEmailBtn:hover, 
form button#updatePasswordBtn:hover, form button#changePasswordBtn:hover {
  background-color: #0056b3;
}

/* Social buttons container */
.social-buttons {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 15px 0;
}

/* Individual social login buttons */
.social-buttons button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  font-size: 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  color: #fff;
}

.social-buttons button i {
  margin-right: 8px; /* space between icon and text */
  vertical-align: middle;
}


/* Provider colors */

/* Google button */
.social-buttons button.google {
  display: flex;
  align-items: center;
  background-color: #fff; /* White background required */
  border: 1px solid #dadce0; /* Subtle border */
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  color: #3c4043;
  transition: box-shadow 0.2s ease-in-out;
}

.social-buttons button.google:hover {
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}

/* Google icon */
.social-buttons .google-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}


.social-buttons button.facebook {
  background-color: #4267B2;
}

.social-buttons button.apple {
  background-color: #000000;
}

.social-buttons button:hover {
  opacity: 0.9;
}

.logout-btn {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  color: #007bff;
}

.logout-btn:hover {
  text-decoration: underline;
}

.message {
  margin: 10px 0;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 14px;
  display: inline-block;
}

.success {
  color: green;
  font-weight: bold;
}


.error {
  color: red;
  font-weight: bold;
}

.password-wrapper {
  position: relative;
  width: 100%; 
  box-sizing: border-box;
}

.password-wrapper input {
  width: 100%;
  padding-right: 35px; 
  box-sizing: border-box; 
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  user-select: none;
  color: #666;
}

.toggle-password:hover {
  color: #000;
}
#cookie-banner {
  position: fixed;
  bottom: -150px; /* Start hidden below the screen */
  left: 50%;
  transform: translateX(-50%);
  max-width: 900px;
  width: 90%;
  background-color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  z-index: 9999;
  flex-wrap: wrap;
  opacity: 0;
  transition: all 0.5s ease; /* Smooth slide and fade */
}

#cookie-banner.show {
  bottom: 20px;
  opacity: 1;
}

#cookie-banner .cookie-text {
  flex: 1;
  margin-right: 15px;
  color: #333;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  margin-top: 5px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.cookie-buttons button {
  padding: 7px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #fff;
  background-color: #007bff;
  transition: background-color 0.2s ease;
}

.cookie-buttons button.secondary {
  background-color: #6c757d;
}

.cookie-buttons button.secondary:hover {
  background-color: #5a6268;
}

.dropdown-list {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  max-height: 150px;
  overflow-y: auto;
  display: none;
  width: 100%; /* match parent input width */
  z-index: 1000;
  width: 100%;
  max-width: 100%; /* limit width for better UX */
  min-width: unset; /* ensure it doesn't get too narrow */
  box-sizing: border-box;
}
.dropdown-list div {
  padding: 5px;
  cursor: pointer;
}
.dropdown-list div:hover {
  background-color: #eee;
}

/* Flex layout for departure and arrival on same row */
/* Row flex container */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

/* Each section (Departure / Arrival) */
.section {
  flex: 1 1 250px; /* ensures both sections share space nicely */
  display: flex;
  flex-direction: column;
}

/* Align checkboxes and labels nicely */
.option {
  display: flex;
  align-items: flex-start; /* aligns checkbox, label, and number input horizontally */
  gap: 10px; 
  margin-bottom: 10px;
  flex-wrap: wrap;

}

/* Number inputs next to text or labels */
.option input[type="number"] {
  flex: 0 0 80px; /* fixed width, does not grow */
}

/* Optional: small tweaks for labels next to checkbox */
.option label {
  margin: 0;
  flex: 1 1 auto; /* label takes remaining space */
  white-space: normal;
}

/* Make date inputs same width as text inputs */
input[type="date"],
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 8px;
  box-sizing: border-box; /* Ensure padding is included in width */
  border: 1px solid #ccc;
  border-radius: 4px;
}


input[type="checkbox"] {
    width: 18px;   /* desired width */
    height: 18px;  /* desired height */
    margin: 4px;   /* adjust spacing if needed */
    vertical-align: middle;
}


#cabin_baggage_allowance,
#checkin_baggage_allowance {
  width: 70px;
  margin-left: 5px;
}

label {
  margin-bottom: 4px;
  white-space: normal;
  word-break: break-word;
}


/* Save Itinerary button, Publsih parcel request*/
#save_itinerary ,#publish_request {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  background-color: #007bff; /* Primary blue */
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

#save_itinerary:hover, #publish_request:hover  {
  background-color: #0056b3;
  transform: translateY(-1px);
}

#save_itinerary:active, #publish_request:active {
  background-color: #00408d;
  transform: translateY(0);
}


/* Table container with horizontal scroll and bottom margin */
.itinerary-table-container, .parcel-table-container {
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 30px;
  padding-bottom: 15px; /* space for scrollbar */
}

.itinerary-table, .parcel-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0 6px;
    table-layout: auto; 
    min-width: unset; 
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;

}

.itinerary-table td, .parcel-table td {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
    white-space: pre-line; /*allow wrapping */

}

.itinerary-table th, .parcel-table th {
    background-color: #f9f9f9;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 2px solid #ccc;
    white-space: nowrap;
}


.itinerary-table tbody tr:hover, .parcel-table tbody tr:hover {
    background-color: #f5faff;
}



/* Email panel styling */
.email-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90%;
  height: 100%;
  background-color: #f9f9f9;
  padding: 20px;
  box-shadow: -2px 0 10px rgba(0,0,0,0.3);
  overflow-y: auto;
  z-index: 9999;
}

.email-panel textarea {
  width: 100%;
  height: 200px;
  padding: 8px;
  margin-bottom: 15px;
  resize: vertical;
}

.email-panel-buttons {
  display: flex;
  gap: 10px;
}

.amount-currency-group {
  display: flex;
  align-items: center; /* 🔹 Perfect vertical alignment */
  gap: 10px;
  margin: 10px 0;
}

.amount-currency-group select {
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.4;
  height: 40px;              /* Force consistent height */
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
  appearance: none;          /* Remove browser-specific styles */
  -moz-appearance: none;     /* Firefox fix */
  -webkit-appearance: none;  /* Safari fix */
  vertical-align: middle;    /* 🔹 Fix odd inline alignment issues */
}

/* Proportion control: make amount box larger than currency */
#offer_amount {
  flex: 2; /* Twice as wide */
}

#currency {
  flex: 1;
  min-width: 90px; /* Prevent currency box from becoming too small */
}

.amount-currency-group select:focus {
  outline: none;
  border-color: #007bff;
}

/* General action buttons */
#search_itineraries,
#open_email_panel,
#send_email_confirm,
#close_email_panel,
#search_parcels {
  display: inline-block;
  padding: 10px 20px;
  font-size: 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Primary buttons (blue) */
#search_itineraries,
#open_email_panel,
#send_email_confirm,
#search_parcels {
  background-color: #007bff;
  color: #fff;
}

#search_itineraries:hover,
#open_email_panel:hover,
#send_email_confirm:hover,
#search_parcels:hover {
  background-color: #0056b3;
  transform: translateY(-1px);
}

#search_itineraries:active,
#open_email_panel:active,
#send_email_confirm:active,
#search_parcels:active {
  background-color: #00408d;
  transform: translateY(0);
}

#open_email_panel:disabled {
  background-color: #ccc;       /* grey background */
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Secondary button (close) */
#close_email_panel {
  background-color: #6c757d;
  color: #fff;
}

#close_email_panel:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
}

#close_email_panel:active {
  background-color: #444;
  transform: translateY(0);
}

.section-header {
    display: flex;
    justify-content:space-between;
    margin-bottom: 10px;
    align-items: center;
    padding: 0 5px;
}

.add-btn , .search-btn-main {
    
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.2s;
}
.add-btn {
    background-color: #4CAF50; /* Green */
    color: white;
    margin-left: 10px;
}
.search-btn-main {
    background-color: #007BFF; /* Blue */
    color: white;
}

.add-btn:hover {
    background-color: #45a049;
}
.search-btn-main:hover {
    background-color: #0056b3;
}


.footer {
  background-color: #f5f5f5;
  padding: 20px 10px;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid #ddd;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  margin: 0 10px;
  text-decoration: none;
  color: #555;
  transition: color 0.2s ease-in-out;
}

.footer-links a:hover {
  color: #000;
}

/* Side menu hidden by default */
.left-side-menu {
  height: 100%;
  width: 10px;               /* hidden initially */
  position: fixed;
  z-index: 1100;
  top: 70px;
  left: 0;
  background-color: #111;
  overflow-x: hidden;     /* prevent horizontal scroll */
  transition: 0.3s;       /* smooth slide */
  padding-top: 60px;      /* space for top bar */
}

.left-side-menu a {
  padding: 12px 24px;
  text-decoration: none;
  font-size: 16px;
  color: white;
  display: block;
  transition: 0.2s;
}

.left-side-menu a:hover {
  background-color: #575757;
}
.left-side-menu:not(.open):hover {
  width: 20px;               /* gives a visual cue */
}

/* Main two-column layout */
.page-layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  gap: 20px;
}

/* Main content scrolls independently */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
}

/* Sidebar stays fixed */
.sidebar {
  width: 320px;
  position: sticky;
  top: 20px; /* stays visible as you scroll */
  align-self: flex-start;
  height: fit-content;
}

.login-section {
  background: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.app-description {
  margin-bottom: 30px;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
}

.tabs {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #ccc;
  margin-bottom: 1em;
}

.tab-btn {
  flex: 1;
  margin: 0 5px;
  padding: 12px 0;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  border-radius: 8px 8px 0 0;
  background: #f1f1f1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tab-btn.active {
  background: #007BFF;
  color: white;
  font-weight: 600;
}

.cookie-buttons {
  display: flex;
  justify-content: flex-end; /* or space-between */
  flex-wrap: nowrap;
}

.modal {
  display: none; 
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background: white;
  padding: 20px;
  max-width: 400px;
  margin: 15% auto;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0px 5px 15px rgba(0,0,0,0.3);
}

.modal-actions {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.btn-primary {background: #007bff; color: white;}
.btn-primary:hover { background: #0056b3; }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #b02a37; }
.btn-secondary { background: #e0e0e0; }
.btn-secondary:hover { background: #c7c7c7; }

/* Larger modal for search results */
.modal-large {
  max-width: 800px;
  width: 90%;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
}

#closeSearchResults {
  float: right;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}

#searchResultsContainer {
  margin-top: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

/* === Info icon styling === */
.info-icon {
  display: inline-block;
  margin-left: 6px;
  cursor: pointer;
  font-size: 16px; /* Big enough to tap on mobile */
  color: #007bff;
  position: relative;
  user-select: none;
}

/* === Tooltip text (hidden by default) === */
.info-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  display: block;             /* ✅ Make it a proper block box */
  left: 50%;
  bottom: 125%;               /* Show above the icon by default */
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: pre-line; 
  max-width: 240px;           /* ✅ Prevent extra-wide tooltips */
  width: max-content;         /* ✅ Grow naturally to fit content */
  min-width: 150px;           /* ✅ Keep at least a usable size */
  word-wrap: break-word;      /* ✅ Break long words if needed */

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out;
  z-index: 10;
  text-align: left;           /* ✅ Natural reading flow */
}

/* Tooltip arrow */
.info-icon::before {
  content: "";
  position: absolute;
  display: block; /* ✅ Ensure proper rendering */
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent rgba(0, 0, 0, 0.85) transparent;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

/* === Show tooltip on hover (desktop) or focus (mobile tap) === */
.info-icon:hover::after,
.info-icon:hover::before,
.info-icon:focus::after,
.info-icon:focus::before {
  opacity: 1;
  pointer-events: auto;
}

.platform-stats {
  margin: 1rem 0;
  text-align: center;
  font-size: 1rem;
  color: #444;
}
.stats-container {
  display: inline-block;
  background: #f9f9f9;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}



/* Media Queries */

/* Tablets and small screens */
@media (max-width: 768px) { /* 768px */
  .container {
    margin: 1.875rem 1.25rem; /* 30px 20px */
    padding: 1.25rem; /* 20px */
  }

  .social-buttons {
    flex-direction: column;
    gap: 0.75rem; /* 12px */
  }

  .social-buttons button {
    width: 100%;
    font-size: 0.875rem; /* 14px */
    padding: 0.625rem 0; /* 10px 0 */
  }

  #cookie-banner {
    font-size: 0.8125rem; /* 13px */
    padding: 0.75rem 0.9375rem; /* 12px 15px */
  }

  .cookie-buttons button {
    font-size: 0.8125rem; /* 13px */
    padding: 0.4375rem 0.875rem; /* 7px 14px */
  }
  .page-layout {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    width: 100%;
    top: auto;
  }
  .info-icon::after {
    bottom: auto;
    top: 125%; /* Show tooltip BELOW icon */
  }

  .info-icon::before {
    bottom: auto;
    top: 115%;
    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
  }
}



/* Mobile phones */
@media (max-width: 30rem) { /* 480px */
  .container {
    margin: 1.25rem 0.9375rem; /* 20px 15px */
    padding: 0.9375rem; /* 15px */
  }

  form input, form select, form button#loginBtn, form button#registerEmailBtn, form button#sendResetEmailBtn,
   form button#updatePasswordBtn, form button#changePasswordBtn {
    font-size: 0.9375rem; /* 15px */
    padding: 0.75rem 0.625rem; /* 12px 10px */
  }

  .social-buttons {
    flex-direction: column;
    gap: 0.625rem; /* 10px */
  }

  .social-buttons button {
    font-size: 0.8125rem; /* 13px */
    padding: 0.625rem 0; /* 10px 0 */
  }

  #cookie-banner {
    font-size: 0.75rem; /* 12px */
    padding: 0.625rem 0.75rem; /* 10px 12px */
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .cookie-buttons button {
    font-size: 0.75rem; /* 12px */
    padding: 0.375rem 0.75rem; /* 6px 12px */
    margin: 0.1875rem; /* 3px */
  }

  side-menu-toggle {
    top: 60px;  /* slightly lower */
    left: 8px;
    font-size: 20px;
  }
  .row {
    flex-direction: column;
    gap: 10px; /* smaller gap */
  }
  .option {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  label {
    white-space: normal;
    word-break: break-word;
  }
  .dropdown-list {
    max-width: 100%;
    min-width: unset;
  }
  .page-layout {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    width: 100%;
    top: auto;
  }
  .info-icon {
    font-size: 18px; /* Larger tap target */
  }

  .info-icon::after {
    max-width: 180px;
    font-size: 12px;
    padding: 6px 8px;
  }
}
