/* static/css/styles.css */

/* General Styles */
body {
    background-color: #f8f9fa;
    padding-bottom: 2rem;
}

h1 {
    color: #007bff;
    text-align: center;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

p {
    color: #333;
    margin-bottom: 0.5rem;
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    color: #0056b3;
}

/* Container */
.container {
    max-width: 100%;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    h3 {
        font-size: 1.5rem;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

label {
    font-weight: 500;
    margin-bottom: 0.3rem;
    display: block;
}

input.form-control {
    height: 48px;
    font-size: 16px; /* Prevents iOS zoom on focus */
    width: 100%;
    padding: 0.375rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

input.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
    outline: 0;
}

.btn-primary {
    background-color: #007bff;
    border: none;
    width: 100%;
    height: 48px;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1rem;
    color: white;
    border-radius: 0.25rem;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-secondary {
    background-color: #6c757d;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 1rem;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.back-button {
    display: inline-block;
    width: 100%;
    text-align: center;
    height: 48px;
    line-height: 32px;
}

@media (min-width: 768px) {
    .back-button {
        width: auto;
    }
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .navigation-buttons {
        justify-content: flex-end;
    }
}

/* Coordinate inputs layout */
.coordinate-inputs {
    display: flex;
    gap: 10px;
}

.coordinate-inputs .form-group {
    flex: 1;
}

/* Hotel List Styles */
.hotel-list {
    padding-left: 0;
    list-style: none;
}

.hotel-item {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    transition: background-color 0.2s ease;
}

.hotel-item:hover {
    background-color: #f8f9fa;
}

.hotel-info {
    display: flex;
    flex-direction: column;
}

.hotel-name {
    margin-bottom: 0.5rem;
}

.hotel-name h5 {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.hotel-details {
    margin-top: 0.5rem;
}

.availability-status {
    font-weight: 500;
}

/* Hotel Details Page Styles */
.hotel-details-card {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.hotel-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .hotel-info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hotel-info-item {
    margin-bottom: 0.25rem;
}

.rate-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.rate-item {
    margin-bottom: 0.5rem;
}

.rate-item strong {
    color: #495057;
}

/* On desktop, make hotel-info a row with details on the right */
@media (min-width: 768px) {
    .hotel-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .hotel-name {
        margin-bottom: 0;
        flex: 1;
    }
    
    .hotel-details {
        margin-top: 0;
        text-align: right;
    }
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    background-color: #fff;
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.table thead th {
    background-color: #e9ecef;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
    vertical-align: bottom;
    white-space: nowrap;
}

.table td {
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
}

/* Alert Styles */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Results Location */
.results-location {
    margin-bottom: 1.5rem;
}

/* Modal Styles */
.modal-content {
    border-radius: 0.5rem;
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e9ecef;
}

.corp-code-trigger {
    cursor: pointer;
    text-decoration: underline;
}

/* Loading Indicator */
#loading {
    text-align: center;
    margin: 2rem 0;
}

#loading img {
    display: block;
    margin: 0 auto;
    width: 50px;
}

#loading p {
    margin-top: 10px;
    color: #555;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table td, .table th {
        padding: 0.5rem 0.25rem;
    }
}