/* Custom styles for Break Queue Restaurant Finder */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
}

/* Body and Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Header Styling */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Restaurant Card Specific Styling */
.restaurant-card {
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.restaurant-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Rating Stars */
.rating-stars {
    color: #ffc107;
    font-size: 1.1rem;
}

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

/* Popular Times Visualization */
.popular-times {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 0.5rem;
}

.popular-times h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.busyness-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.busyness-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #ffc107 50%, #dc3545 100%);
    transition: width 0.3s ease-in-out;
}

.busyness-label {
    font-size: 0.75rem;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
}

/* Voucher Styling */
.voucher-badge {
    background: linear-gradient(45deg, var(--success-color), #20c997);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    display: inline-block;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(25, 135, 84, 0.3);
}

.voucher-link {
    background: linear-gradient(45deg, var(--success-color), #20c997);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.voucher-link:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(25, 135, 84, 0.4);
}

/* Status Indicators */
.status-open {
    color: var(--success-color);
    font-weight: 600;
}

.status-closed {
    color: var(--danger-color);
    font-weight: 600;
}

/* Loading States */
.htmx-indicator {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Geolocation Button */
#geolocationBtn {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}

#geolocationBtn:hover {
    background-color: var(--primary-color);
    color: white;
}

#geolocationBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .restaurant-card {
        margin-bottom: 1rem;
    }
    
    .voucher-link {
        width: 100%;
        text-align: center;
    }
}

/* Animation for new results */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.restaurant-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Custom Alert Styling */
.alert {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d1edff 0%, #b8daff 100%);
    color: #0c5460;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid var(--info-color);
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm-custom {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}
