/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Delivery Address Section */
.delivery-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.delivery-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.address-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#delivery-address {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#delivery-address:focus {
    outline: none;
    border-color: #667eea;
}

#set-address-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#set-address-btn:hover {
    transform: translateY(-2px);
}

#set-address-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.address-status {
    margin-top: 1rem;
}

.address-status .success {
    color: #28a745;
    font-weight: 600;
}

.address-status .error {
    color: #dc3545;
    font-weight: 600;
}

/* Map and Info Layout */
.map-info-container {
    display: flex;
    gap: 1rem;
    height: calc(100vh - 300px);
}

/* Map section */
.map-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-container {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: #667eea;
}

#search-button {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#search-button:hover {
    transform: translateY(-2px);
}

#map {
    flex: 1;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    min-height: 400px;
}

/* Info panel */
.info-panel {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.info-panel h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.restaurant-details {
    margin-bottom: 1.5rem;
}

.restaurant-details h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.restaurant-details p {
    margin-bottom: 0.5rem;
    color: #666;
}

.visit-website-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
}

.visit-website-btn:hover {
    transform: translateY(-2px);
}

.website-actions {
    margin: 1.5rem 0;
}

.website-note {
    margin-top: 0.5rem;
    color: #6c757d;
    font-style: italic;
}

.no-website-section {
    margin: 1.5rem 0;
}

.phone-order-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
    margin-top: 1rem;
}

.phone-order-btn:hover {
    transform: translateY(-2px);
}

/* Driver Reservation Section */
.driver-reservation-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.driver-reservation-section h4 {
    color: #856404;
    margin-bottom: 0.5rem;
}

.reserve-driver-btn {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
    margin-top: 1rem;
}

.reserve-driver-btn:hover {
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Reservation Summary */
.reservation-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.reservation-summary h4 {
    color: #333;
    margin-bottom: 1rem;
}

.reservation-summary p {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Success Modal */
.success-content {
    text-align: center;
}

.success-summary {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    text-align: left;
}

.success-summary p {
    margin-bottom: 0.5rem;
}

.next-steps {
    text-align: left;
    margin: 2rem 0;
}

.next-steps h4 {
    color: #333;
    margin-bottom: 1rem;
}

.next-steps ol {
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.5rem;
    color: #666;
}

/* Buttons */
.confirm-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
}

.confirm-btn:hover {
    transform: translateY(-2px);
}

.confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.close-btn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    margin-top: 1rem;
}

.close-btn:hover {
    transform: translateY(-2px);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Status indicators */
.open-now {
    color: #28a745;
    font-weight: bold;
}

.closed-now {
    color: #dc3545;
    font-weight: bold;
}

.phone-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.phone-link:hover {
    text-decoration: underline;
}

/* Success and error messages */
.success-notification {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease-out;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification system */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
}

.notification.info {
    background: #17a2b8;
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .map-info-container {
        flex-direction: column;
        height: auto;
    }
    
    .map-section {
        order: 2;
    }
    
    .info-panel {
        order: 1;
        max-height: none;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .address-input-container {
        flex-direction: column;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
    
    .delivery-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem 0.5rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 5% auto;
        padding: 1rem;
    }
}
