:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --background: #f8fafc;
  --card-background: #ffffff;
  --border-color: #e5e7eb;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-light);
  font-size: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

input[type="date"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--background);
  transition: border-color 0.2s;
}

input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background-color: var(--primary-hover);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.loading-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

.hidden {
  display: none;
}

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

/* Results page styling */
.results-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2rem 0;
  background: linear-gradient(to bottom, var(--background), var(--card-background));
  border-radius: 1rem;
  box-shadow: var(--card-shadow);
}

.results-header h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, var(--primary-color), var(--primary-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.results-container {
  padding: 1rem 0;
}

.results-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* Result card styling */
.result-card {
  background-color: var(--card-background);
  border-radius: 1rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-hover-shadow);
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
}

.result-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.restaurant-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.restaurant-name a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s;
}

.restaurant-name a:hover {
  color: var(--primary-color);
}

.restaurant-meta {
  display: flex;
  gap: 0.75rem;
  color: var(--text-light);
  font-size: 0.875rem;
}

.cuisine {
  font-weight: 500;
}

.price {
  color: var(--primary-color);
  font-weight: 600;
}

.result-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-light);
  font-size: 0.875rem;
  padding: 0.5rem;
  background-color: var(--background);
  border-radius: 0.5rem;
}

.detail-text {
  line-height: 1.4;
}

.icon {
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.8;
}

.card-actions {
  padding: 1rem;
  background-color: var(--card-background);
  border-top: 1px solid var(--border-color);
}

.reserve-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
}

.reserve-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.reserve-btn .icon {
  fill: white;
  opacity: 1;
}

.results-footer {
  margin-top: 3rem;
  text-align: center;
  padding: 2rem 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  background-color: var(--background);
  transition: all 0.2s;
}

.back-link:hover {
  background-color: var(--primary-color);
  color: white;
}

.back-link:hover .icon {
  fill: white;
}

/* Responsive adjustments */
@media (min-width: 640px) {
  .container {
    padding: 2rem;
  }
  
  .results-header {
    padding: 3rem 0;
  }
  
  .results-grid {
    gap: 2rem;
  }
  
  .result-card {
    margin-bottom: 0;
  }
}

@media (max-width: 639px) {
  .results-header {
    margin: -1.5rem -1.5rem 2rem;
    border-radius: 0;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
}

.detail-item.available-times {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-light);
  font-size: 0.875rem;
  padding: 0.75rem;
  background-color: var(--background);
  border-radius: 0.5rem;
}

.times-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

.time-slot {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  background-color: var(--card-background);
  border-radius: 0.375rem;
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.8125rem;
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.time-slot:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}