/* public/css/style.css */

/* Basic Reset & Defaults */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4; /* Light background */
}

h1,
h2,
h3 {
  margin-bottom: 0.8em;
  color: #1a2a45; /* Darker blue for headings */
}

p {
  margin-bottom: 1em;
}

a {
  color: #007bff; /* Standard link blue */
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Utility */
.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

.cta-button {
  display: inline-block;
  background-color: #0056b3; /* Primary blue */
  color: #fff;
  padding: 12px 25px;
  border: none;
  border-radius: 25px; /* Rounded corners */
  font-size: 1.1em;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-decoration: none; /* Ensure links styled as buttons don't underline */
}

.cta-button:hover:not(:disabled) {
  background-color: #004494; /* Darker blue on hover */
  transform: translateY(-2px);
  text-decoration: none;
}
.cta-button:active:not(:disabled) {
  transform: translateY(0px);
}

.cta-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  opacity: 0.7;
}

/* --- Landing Page Specific Styles --- */
.landing-header,
.landing-footer {
  background-color: #1a2a45; /* Dark blue */
  color: #fff;
  padding: 1em 0;
  text-align: center;
}
.landing-header h1 {
  color: #fff;
  margin-bottom: 0;
}

.landing-main {
  padding: 40px 20px;
}

.hero {
  text-align: center;
  background-color: #e9ecef; /* Light grey background for hero */
  padding: 40px 20px;
  border-radius: 8px;
  margin-bottom: 40px;
}

.hero h2 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
}

.hero p {
  font-size: 1.2em;
  margin-bottom: 1.5em;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.services {
  max-width: 800px;
  margin: 40px auto;
}

.services h2 {
  text-align: center;
  margin-bottom: 1.5em;
}

.services ol,
.services ul {
  list-style-position: inside; /* Bullets/numbers inside */
  margin-left: 20px; /* Indentation */
  margin-bottom: 2em;
}
.services ol li,
.services ul li {
  margin-bottom: 0.7em;
}

/* --- Request Page Specific Styles --- */
body {
  /* Prevent scrolling on the body for app feel, container handles scroll if needed */
  /* overflow: hidden; */ /* Reconsider this - might hide useful content on small screens */
}

.request-container {
  max-width: 500px; /* Limit width for app-like view */
  margin: 30px auto; /* Center container */
  padding: 30px;
  background-color: #fff;
  border-radius: 12px; /* Rounded corners */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* Subtle shadow */
  overflow-y: auto; /* Allow scrolling within container if content overflows */
  max-height: 90vh; /* Limit height, prevent going off-screen */
}

.request-header {
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}
.request-header h2 {
  margin-bottom: 0.3em;
}
#location-status {
  font-size: 0.9em;
  color: #666;
  min-height: 1.2em; /* Prevent layout shifts */
}

#request-form {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Space between form elements */
}

.form-group,
.vehicle-info {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Space between label and input */
}

.vehicle-info {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px; /* Add some space above the fieldset */
}

.vehicle-info legend {
  padding: 0 10px; /* Spacing around legend text */
  font-weight: 500;
  color: #333;
}

label {
  font-weight: 500;
  color: #555;
}

input[type="text"],
input[type="tel"],
input[type="email"], /* Add other input types as needed */
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  outline: none;
}
textarea {
  resize: vertical; /* Allow vertical resizing */
  min-height: 60px;
}

select {
  appearance: none; /* Remove default dropdown arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E"); /* Custom arrow */
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 1em;
  padding-right: 40px; /* Space for the custom arrow */
}

#request-form .cta-button {
  margin-top: 15px; /* Space above submit button */
  width: 100%;
  font-size: 1.2em;
  padding: 15px;
}

/* Status Message Styling */
.status-message {
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-size: 0.95em;
  display: none; /* Hidden by default */
  text-align: center;
}

.status-message.success {
  background-color: #d4edda; /* Light green */
  color: #155724; /* Dark green */
  border: 1px solid #c3e6cb;
}

.status-message.error {
  background-color: #f8d7da; /* Light red */
  color: #721c24; /* Dark red */
  border: 1px solid #f5c6cb;
}
.status-message.info {
  background-color: #cce5ff; /* Light blue */
  color: #004085; /* Dark blue */
  border: 1px solid #b8daff;
}

/* public/css/style.css */

/* --- Styles for Map Integration --- */
.map-area {
  margin-bottom: 25px; /* Space between map area and form */
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden; /* Keep map corners rounded */
}

#map {
  height: 300px; /* Adjust height as needed */
  width: 100%;
  background-color: #e0e0e0; /* Placeholder background */
}

.address-search-container {
  display: flex;
  padding: 10px;
  background-color: #f8f8f8;
  border-top: 1px solid #ccc;
}

#address-search {
  flex-grow: 1; /* Input takes available space */
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px; /* Round left corners */
  font-size: 0.9em;
}
#address-search:focus {
  border-color: #007bff;
  box-shadow: none; /* Override general input focus */
  outline: none;
  z-index: 10; /* Ensure focus outline is visible */
  position: relative;
}

.small-button {
  /* Basic styling for smaller buttons like 'Find' */
  padding: 8px 15px;
  background-color: #6c757d; /* Grey */
  color: white;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  border-radius: 0 4px 4px 0; /* Round right corners */
  transition: background-color 0.3s ease;
}
.small-button:hover {
  background-color: #5a6268;
}

.selected-address-display {
  padding: 10px 15px;
  background-color: #f0f0f0;
  font-size: 0.85em;
  color: #555;
  text-align: center;
  min-height: 1.5em;
  border-top: 1px solid #ddd;
  font-style: italic;
}

/* Adjust existing input focus style slightly if needed */
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.2); /* Subtle shadow */
  outline: none;
  position: relative; /* Helps with potential z-index issues */
  z-index: 1;
}

/* --- Adjust Request Container Padding --- */
.request-container {
  /* Potentially reduce top/bottom padding if map adds too much height */
  padding: 20px 30px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 2em;
  }
  .hero p {
    font-size: 1.1em;
  }
  .request-container {
    margin: 15px;
    padding: 20px;
    max-height: none; /* Allow container to grow on mobile */
  }
}

@media (max-width: 480px) {
  .cta-button {
    font-size: 1em;
    padding: 10px 20px;
  }
  #request-form {
    gap: 15px;
  }
  input[type="text"],
  input[type="tel"],
  select,
  textarea {
    padding: 10px 12px;
    font-size: 0.95em;
  }
}
