/* ---------- Base Styles ---------- */
body {
  background-color: #000;
  color: #d4af37;
  font-family: 'Georgia', serif;
  margin: 0;
  padding: 0;
  text-align: center;
}

/* Header alignment fix */
header {
  text-align: center;
  margin-bottom: 15px;
}

.header-top {
  display: flex;
  align-items: center;       /* vertically centers logo + text */
  justify-content: center;   /* horizontally centers both */
  gap: 10px;                 /* space between logo and text */
}

.header-top img {
  height: 50px;              /* adjust logo size */
  width: auto;
  display: block;
}

.header-top h1 {
  font-size: 22px;
  color: gold;
  margin: 0;
  font-weight: 700;
  font-family: serif;
}

.tagline {
  margin-top: 6px;
  font-size: 14px;
  color: #FFD700;
  font-style: italic;
}

/* ---------- Main Form Containers ---------- */
main {
  max-width: 600px;
  margin: auto;
  padding: 20px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ---------- Inputs, Selects, Textareas ---------- */
input, select, textarea {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #d4af37;
  background-color: #111;
  color: #fff;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Georgia', serif;
}

/* ✅ Fix 1: datetime input overflow */
input[type="datetime-local"] {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  appearance: none;
-webkit-appearance: none;
}

/* ✅ Fix Registration & Insurance Expiry alignment */
input[type="date"] {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 44px; /* force same height as text inputs */
  box-sizing: border-box;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #d4af37;
  background-color: #111;
  color: #fff;
  font-size: 16px;
  font-family: 'Georgia', serif;
  appearance: none;
  -webkit-appearance: none;
  line-height: normal; /* fix Safari vertical centering */
}

/* Textarea specific */
textarea {
  resize: vertical;
  min-height: 60px;
}

/* ---------- Buttons ---------- */
button {
  background-color: #d4af37;
  color: #000;
  padding: 12px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1em;
  border-radius: 6px;
  transition: all 0.2s ease;
}

button:hover {
  background-color: #c39b2b;
}

/* ✅ Fix 2: breathing room above Assign button */
#assignBtn {
  margin-top: 12px;
}
/* ---------- Button Group for Admin ---------- */
.button-group {
  display: flex;              /* Arrange buttons side by side */
  gap: 10px;                  /* Space between buttons */
  justify-content: center;    /* Center buttons horizontally */
  margin-top: 12px;           /* Match spacing above buttons */
}

.button-group .btn {
  flex: 1;                    /* Make buttons same width (optional) */
  max-width: 200px;           /* Optional max width for responsiveness */
}

/* ---------- Fare Summary ---------- */
#fareSummary {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 10px;
  color: #FFD700;
}

/* ---------- Loading Spinner ---------- */
#loadingSpinner {
  display: none;
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 9999;

  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #d4af37;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---------- Admin & Driver Specific ---------- */
.booking-item {
  background-color: #000000; /* black background */
  color: #d4af37; /* gold text */
  border: 1px solid #B9975B; /* gold border to make boxes visible */
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
}

.booking-item:hover {
  background-color: #1a1a1a; /* slightly lighter black */
  cursor: pointer;
}

#status {
  margin-top: 10px;
  font-weight: bold;
  color: #FFD700;
}

/* ---------- Completed Job Boxes ---------- */
.job-entry {
  background-color: #000;        /* dark background */
  color: #d4af37;               /* gold text */
  margin: 10px 0;               /* spacing between boxes */
  padding: 12px;                /* inner padding */
  border-radius: 8px;           /* rounded corners */
  box-shadow: 0 3px 6px rgba(0,0,0,0.3); /* subtle shadow */
  transition: transform 0.2s, box-shadow 0.2s;
}

.job-entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
  background-color: #222;       /* slightly lighter black on hover */
}


/* ---------- Responsive (LAST) ---------- */
@media (max-width: 600px) {
  main {
    padding: 10px;
    max-width: 100%;
  }

  input, select, textarea, button {
    max-width: 100%;
  }

/* ✅ Fix for iPhone home bar overlap (adjusted tighter for proper alignment) */
#payNow,
#payHourlyNow {
  margin-bottom: calc(env(safe-area-inset-bottom) + 80px) !important;
  padding-bottom: 20px !important;
}

main {
  padding-bottom: calc(env(safe-area-inset-bottom) + 10px) !important;
}

    /* ✅ Fix for iPhone notch pushing logo too high */
  header {
    padding-top: calc(env(safe-area-inset-top) + 10px);
  }

  #calculateFare,
#calculateHourlyFare {
  margin-top: 10px;
}

#fareSummary,
#hourlyFareSummary {
  margin-top: 10px;
  color: gold;
  font-weight: bold;
  font-size: 18px;
}

#hours {
  margin-top: 0;      /* remove gap above input */
  margin-bottom: 6px; /* small space below */
}

  /* Extra safe area breathing room for iPhone bottom bar */
#hourlyForm form {
  padding-bottom: calc(env(safe-area-inset-bottom) + 30px);
}

#pointToPointForm form {
  padding-bottom: calc(env(safe-area-inset-bottom) + 30px);
}
}
