/* ------------------------------
   RESET & BASE STYLES
------------------------------ */
html {
    scroll-behavior: smooth;
  }
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  .error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 4px;
  }
  
  /* ------------------------------
   NAVIGATION BAR WITH LOGO
  ------------------------------ */
  nav {
    background-color: #BD3890;
    padding: 10px 10px;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Logo on the left */
  .nav-logo {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between logo and text */
  }

  .nav-img-logo {
    max-height: 50px;
  }
  .nav-text-logo {
    max-height: 40px; /* Adjust this based on visual preference */
  }

  /* Navigation links on the right */
  .nav-links {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
  }

  .nav-links li {
    margin: 0 5px;
  }

  .nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem; /* Increase font size */
    padding: 10px 15px; /* Add padding for better spacing */
    transition: all 0.3s ease;
  }

  .nav-links li a:hover {
    text-decoration: underline;
    font-size: 1.3rem; /* Slightly larger on hover */
  }
  
  /* ------------------------------
     BODY & TYPOGRAPHY
  ------------------------------ */
  body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
  }
  
  /* ------------------------------
     HEADER
  ------------------------------ */

  .header-container {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically */
    background-color: #BD3890;
    padding: 10px 100px; /* Add more padding for better spacing */
    color: white;
    text-align: center;
  }

  .header-text {
    max-width: 700px; /* Increase width slightly for better readability */
  }

  .header-text h1 {
    font-size: 2.1rem; /* Make it larger */
    font-weight: bold;
    margin-bottom: 10px;
  }

  .header-text p {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.5;
  }
  .header-text h1 {
    font-size: 2rem; /* Default size */
    font-weight: bold;
    margin-bottom: 10px;
    transition: transform 0.3s ease-in-out; /* Smooth transition */
  }

  /* Scale text when hovered */
  .header-text h1:hover {
    transform: scale(1.3); /* Increases size by 10% */
  }
  
  /* ------------------------------
     GENERAL SECTION STYLES
  ------------------------------ */
  section {
    padding: 20px;
    margin: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  h2 {
    margin-bottom: 20px;
    color: #BD3890;
    text-align: center;
  }
  ul {
    list-style-type: none;
    text-align: center;
  }
  ul li {
    margin: 10px 0;
    font-size: 1.1em;
  }
  table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
  }
  th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
  }
  th {
    background-color: #BD3890;
    color: white;
  }
  td {
    background-color: #f9f9f9;
  }
  
  /* ------------------------------
     FORMS
  ------------------------------ */
  form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
  }
  form label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 1.1rem;
  }
  form input,
  form textarea,
  form select {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
  }
  form button {
    padding: 10px;
    background-color: #BD3890;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
  }
  form button:hover {
    background-color: #a02e7b;
  }
  
  /* ------------------------------
     FOOTER
  ------------------------------ */
  footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
  }
  
  /* ------------------------------
     LOADING ANIMATION
  ------------------------------ */
  .loading-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
  }
  .road {
    position: relative;
    width: 80%;
    height: 100px;
    background-color: #BD3890;
    border-radius: 50px;
    overflow: hidden;
  }
  .loading-logo {
    position: absolute;
    top: 15px;
    left: -100px;
    height: 70px;
    animation: moveLogo 2s linear infinite;
  }
  @keyframes moveLogo {
    0% { left: -100px; }
    100% { left: calc(100% + 100px); }
  }
  
  /* ------------------------------
   CALCULATOR SECTION (Landing Page Form + Image)
  ------------------------------ */
  .booking-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin: auto;
  }
  
  /* FORM AREA */
  .booking-form {
    flex: 1;
    padding: 30px;
  }
  .booking-form h2 {
    text-align: left;
    color: #BD3890;
    margin-bottom: 20px;
    font-size: 2rem;
  }
  
  /* IMAGE AREA */
  .booking-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
  }
  .booking-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
  }

  /* Overlay shadow for blending */
  .booking-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.05);
    border-radius: 15px;
  }

  .booking-layout-container {
    display: flex;
    flex-wrap: wrap; /* Allows stacking on small screens */
    gap: 30px;
    flex: 1; /* Allows this container to grow and fill space */
  }

  /* --- 2. Improved Luggage Section --- */
  #bookingForm .form-group[data-luggage-item] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
  }

  #bookingForm .form-group[data-luggage-item] label {
    margin-bottom: 0;
    margin-right: 15px;
  }

  #bookingForm .form-group[data-luggage-item] input[type="number"] {
    width: 65px;
    text-align: center;
  }

  /* RESPONSIVE DESIGN: Move the image on top when the screen is narrower */
  @media (max-width: 768px) {
    .booking-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .booking-image {
        order: -1; /* Moves the image to the top */
        width: 100%;
        margin-bottom: 20px;
    }

    .booking-form {
        width: 100%;
    }
  }
  
  /* ------------------------------
     BOOKING SECTION (Scrollable Booking Form with Map)
  ------------------------------ */
  .booking-wrapper {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    gap: 20px;
  }
  .booking-left {
    flex: 1;
    max-height: 700px;
    overflow-y: auto;
    background: #BD3890;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  #booking {
    width: 100%;
  }
  .booking-left h2 {
    text-align: left;
    color: #BD3890;
    margin-bottom: 20px;
    font-size: 2rem;
  }
  /* Right column: map + price summary stacked vertically */
  .booking-right {
    flex: 0 0 380px;      /* sidebar width on desktop */
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 0;        /* let it align with the form */
  }

  /* Make the actual map visible */
  #map {
    width: 100%;
    height: 260px;      /* adjust as you like: 260–320px works well */
    border-radius: 12px;
    overflow: hidden;
  }

  /* Price summary card */
  .price-summary {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    font-size: 1rem;
  }

  .price-summary p {
    margin: 0;
  }

  .price-amount {
    font-size: 1.6rem;
    font-weight: bold;
    margin: 6px 0 10px;
  }

  #scrollToPaymentBtn {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background-color: #BD3890;
    color: white;
    font-weight: 600;
    cursor: pointer;
  }
  
  #scrollToPaymentBtn:hover {
    background-color: #a02e7b;
  }
  
  /* ------------------------------
     FORM CONTAINER (for Booking Form)
  ------------------------------ */
  #booking {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  
  /* ------------------------------
     FORM STYLING
  ------------------------------ */
  fieldset {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
  }
  legend {
    font-weight: bold;
    color: #BD3890;
    font-size: 1.2rem;
  }
  input, select {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
  }
  .inline-fields {
    display: flex;
    justify-content: space-between;
    gap: 20px;
  }
  .inline-fields input {
    width: 48%;
  }

  .assign-bag-tag-button {
    display: block;
    margin: 20px auto;
    padding: 12px 20px;
    background-color: #BD3890;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    text-align: center;
    transition: background 0.3s ease;
  }

  .assign-bag-tag-button:hover {
      background-color: #9C2A76;
  }

  .hidden {
    display: none;
  }
  
  .card {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
  }

  /* Assign Tags action column in order table */
  th.actions,
  td.actions {
    text-align: center;
  }

  /* ------------------------------
    PAYMENT OVERLAY
  ------------------------------ */
  .payment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .payment-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  .payment-overlay.hidden {
    opacity: 0;
    pointer-events: none;
  }

  .payment-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 28px 26px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 14px 40px rgba(0,0,0,0.25);
    position: relative;
  }

  .payment-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    color: #999;
  }

  .payment-close:hover {
    color: #555;
  }

  .payment-spinner {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .spinner-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid #eee;
    border-top-color: #BD3890;
    animation: spin 0.9s linear infinite;
  }

  .payment-success {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* Success icon */
  .success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: success-pop 0.35s 0.35s ease-out both;
  }

  .success-icon-svg {
    width: 100%;
    height: 100%;
  }

  /* Circle outline */
  .success-icon-circle {
    stroke: #28a745;             /* or your preferred green */
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: success-stroke 0.6s ease-out forwards;
  }

  /* Checkmark */
  .success-icon-check {
    stroke: #28a745;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: success-stroke 0.4s 0.4s ease-out forwards;
  }

  .bag-tag-area {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .bag-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  
  .tag-chip {
    background: #f3e1f0;
    color: #BD3890;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
  }
  
  .bag-tag-meta {
    font-size: 0.8rem;
    color: #666;
  }
  
  .bag-tag-inline-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
  }
  
  .bag-tag-input {
    flex: 1;
    padding: 6px 8px;
    font-size: 0.85rem;
  }
  
  .bag-tag-assign-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
    border: none;
    background-color: #BD3890;
    color: #fff;
    cursor: pointer;
  }
  
  .bag-tag-assign-btn:hover {
    background-color: #9C2A76;
  }

  /* Draw stroke animation */
  @keyframes success-stroke {
    to {
      stroke-dashoffset: 0;
    }
  }

  /* Slight “pop” scale */
  @keyframes success-pop {
    0% {
      transform: scale(0.9);
    }
    70% {
      transform: scale(1.05);
    }
    100% {
      transform: scale(1);
    }
  }

  .payment-summary {
    display: none;
    margin-top: 12px;
  }

  .payment-summary p {
    margin-bottom: 12px;
  }

  .primary-btn {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background-color: #BD3890;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
  }

  .primary-btn:hover {
    background-color: #a02e7b;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes popIn {
    0% {
      transform: scale(0.4);
      opacity: 0;
    }
    70% {
      transform: scale(1.05);
      opacity: 1;
    }
    100% {
      transform: scale(1);
    }
  }
    
  /* ------------------------------
     RESPONSIVE DESIGN for Booking and Calculator Sections
  ------------------------------ */
  @media (max-width: 768px) {
    .calculator-wrapper,
    .booking-wrapper {
      flex-direction: column;
    }
    .booking-right {
      position: static;           /* no sticky on small screens */
      width: 100%;
      margin-top: 20px;
    }
  
    #map {
      height: 260px;              /* slightly smaller on mobile */
    }
    #booking {
      width: 90%;
    }
    .inline-fields {
      flex-direction: column;
    }
    .inline-fields input {
      width: 100%;
    }
  }
