/* Base layout */
body {
    font-family: sans-serif;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

form {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
}

label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: bold;
    font-size: 0.9rem;
}

input,
select {
    width: 100%;
    padding: 0.4rem 0.55rem;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 0.75rem;
    position: relative;
}

.row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.col {
    flex: 1 1 150px;
    min-width: 150px;
}

.col.small {
    flex: 1 1 90px;
    min-width: 90px;
}

.col.medium {
    flex: 1 1 150px;
}

button {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

button:hover {
    background: #0056b3;
}

/* Top navigation */
.top-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.top-nav-title {
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    color: #000;
    background-color: #ffc107;
    padding: 0.25em 0.6em;
    border-radius: 0.25rem;
    text-transform: uppercase;
    display: inline-block;
    line-height: 1;
}

.top-nav-links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover {
    background-color: #e2e6ea;
    text-decoration: none;
}

.nav-link-active {
    font-weight: bold;
    background-color: #007bff;
    color: white !important;
}

.nav-link-active:hover {
    background-color: #0056b3;
    color: white !important;
}

/* Page title row */
.page-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-title-row h1 {
    margin: 0;
}

.history-link {
    font-size: 0.95rem;
    color: #007bff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.history-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Autocomplete styles */
.autocomplete-results {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 1000;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
    display: none;
}

.autocomplete-item {
    padding: 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f0f0f0;
}

.autocomplete-code {
    font-weight: bold;
    color: #007bff;
}

.autocomplete-city {
    color: #333;
}

/* Debug & results styles */
.debug-toggle {
    cursor: pointer;
    color: #007bff;
    font-size: 0.85rem;
    text-decoration: underline;
    margin-top: 0.5rem;
    display: inline-block;
}

.debug-content {
    display: none;
    background: #f4f4f4;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

.debug-content.visible {
    display: block;
}

.main-debug {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
}

.offer {
    border: 1px solid #ddd;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.offer .airline {
    font-weight: bold;
    font-size: 1.1rem;
}

.offer .price {
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* History page */
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-meta {
    font-size: 0.9rem;
    color: #333;
}

.history-meta-date {
    font-weight: bold;
    margin-bottom: 0.25rem;
    display: block;
}

.history-meta-info {
    color: #666;
    font-size: 0.85rem;
}

.history-actions a {
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.4rem;
}

.btn-secondary {
    background: #eee;
    color: #333;
}

.btn-primary {
    background: #ffc107;
    color: #333;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

/* Provider select */
.provider-list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.provider-card {
    border: 1px solid #ddd;
    padding: 2rem;
    border-radius: 8px;
    width: 200px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    background: #f9f9f9;
}

.provider-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.provider-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: block;
}

.provider-status {
    font-size: 0.9rem;
    color: #666;
}

.status-active {
    color: #28a745;
}

.status-soon {
    color: #ffc107;
}

.logo-badge {
    font-weight: bold;
    font-size: 2rem;
    text-decoration: none;
    color: #000;
    background-color: #ffc107;
    padding: 0.25em 0.6em;
    border-radius: 0.25rem;
    text-transform: uppercase;
    display: inline-block;
    line-height: 1;
}

/* Trivago-specific */
.filters-columns {
    display: flex;
    gap: 1rem;
}

.filters-columns .col {
    flex: 1;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: normal;
}

.checkbox-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.star-rating-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.star-rating-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: normal;
}

.star-rating-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.hotel-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    background: white;
}

.hotel-image {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}

.hotel-info {
    flex: 1;
}

.hotel-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.hotel-rating {
    background: #007bff;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.hotel-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
}

/* Form footer actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

/* Misc */
.back-link {
    display: block;
    margin-bottom: 1rem;
}

