/* Modern, clean, and visually appealing CSS stylesheet */

:root {
    --primary: #4f8cff;
    --secondary: #232946;
    --accent: #eebbc3;
    --background: #f4f4f9;
    --text: #232946;
    --radius: 10px;
    --shadow: 0 4px 16px rgba(35, 41, 70, 0.08);
}

body {
    background: var(--background);
    color: var(--text);
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--accent);
    text-decoration: underline;
}

button, .btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.7em 1.5em;
    font-size: 1em;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background 0.2s, transform 0.1s;
}
button:hover, .btn:hover {
    background: var(--accent);
    color: var(--secondary);
    transform: translateY(-2px) scale(1.03);
}

input, textarea, select {
    border: 1px solid #ccc;
    border-radius: var(--radius);
    padding: 0.6em 1em;
    font-size: 1em;
    margin-bottom: 1em;
    background: #fff;
    transition: border 0.2s;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    outline: none;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2em;
    margin: 2em 0;
}



.card input[type="text"],
.card input[type="url"] {
    width: 100%;
    box-sizing: border-box;
    font-size: 1.1em;
}

nav {
    background: var(--secondary);
    color: #fff;
    padding: 1em 2em;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 2em;
}
nav a {
    color: #fff;
    font-weight: 500;
    padding: 0.5em 1em;
    border-radius: var(--radius);
    transition: background 0.2s;
}
nav a:hover {
    background: var(--primary);
    color: #fff;
}

footer {
    background: var(--secondary);
    color: #fff;
    text-align: center;
    padding: 1.5em 0;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-top: 3em;
    font-size: 0.95em;
}

::-webkit-scrollbar {
    width: 10px;
    background: var(--background);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius);
}

@media (max-width: 700px) {
    body {
        font-size: 1em;
    }
    .card, nav, footer {
        padding: 1em;
    }
}

img {
    max-width: 120px;
    max-height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
}

.autocomplete-container {
    position: relative;
    margin-bottom: 0;
}

.autocomplete-list {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 180px;
    overflow-y: auto;
    width: 100%;
    z-index: 10;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 9999 !important; /* Ensure it appears above other elements */
}
.autocomplete-list.show {
    display: block;
}
.autocomplete-list li {
    padding: 6px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.autocomplete-list li:last-child {
    border-bottom: none;
}

.route-form-row {
    display: flex;
    gap: 0.5em;
    align-items: flex-start;
    margin-bottom: 2em;
    flex-wrap: wrap;
}

.route-form-row .autocomplete-container,
.route-form-row input[type="url"] {
    flex: 1 1 220px;
    min-width: 220px;
    max-width: 300px;
}

.route-form-row button[type="submit"] {
    flex: 0 0 auto;
    height: 100%;
    margin-top: 0;
    white-space: nowrap;
}

input[type="text"],
input[type="url"] {
    border: 1px solid #ccc;
    border-radius: var(--radius, 12px);
    background: #fff;
    box-sizing: border-box;
    font-size: 1.1em;
    padding: 0.7em 1em;
    outline: none;
    margin: 0;
    box-shadow: none;
}

input[type="text"]:focus,
input[type="url"]:focus {
    border-color: #7daaff;
}

.spinner {
  margin: 1.5em auto 0 auto;
  width: 48px;
  height: 48px;
  border: 6px solid #7daaff;
  border-top: 6px solid #eee;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.steps ol {
  padding-left: 1.2em;
  margin: 0 0 1em 0;
}
.steps li {
  margin-bottom: 0.4em;
  font-size: 1.08em;
}

#ajax-results table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5em;
  background: #fff;
  box-shadow: 0 2px 12px #0001;
  border-radius: 8px;
  overflow: hidden;
}

#ajax-results th, #ajax-results td {
  padding: 0.7em 1em;
  text-align: left;
}

#ajax-results th {
  background: #f6f8fa;
  font-weight: bold;
  border-bottom: 2px solid #e0e0e0;
  color: #222;
}

#ajax-results tr:nth-child(even) {
  background: #fafbfc;
}

#ajax-results tr:hover {
  background: #f0f4f8;
}

#ajax-results img {
  border-radius: 6px;
  box-shadow: 0 1px 4px #0002;
  max-width: 120px;
  max-height: 120px;
  display: block;
  margin: 0 auto;
}

#ajax-results h2 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-size: 1.3em;
  color: #222;
}

