/* 
 * LiverVite - Application de Gestion de Livraison
 * Main stylesheet
 */

/* General Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
}

main {
    flex: 1;
}

.page-header {
    background-color: var(--light-color);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

/* Map Styles */
.map-container {
    height: 400px;
    margin-bottom: 1.5rem;
    border-radius: 0.25rem;
    overflow: hidden;
    border: 1px solid #ddd;
}

.delivery-map {
    height: 100%;
    width: 100%;
}

/* Tracking Page */
.tracking-info {
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
}

.tracking-status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.status-item {
    text-align: center;
    position: relative;
    flex: 1;
}

.status-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1rem;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: #ddd;
    z-index: -1;
}

.status-item.active:not(:last-child)::after {
    background-color: var(--primary-color);
}

.status-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 2px solid #ddd;
    margin-bottom: 0.5rem;
}

.status-item.active .status-icon {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.status-text {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.status-item.active .status-text {
    color: var(--primary-color);
    font-weight: bold;
}

/* Chat System */
.chat-container {
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
}

.message {
    max-width: 75%;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
}

.message-received {
    background-color: #e9ecef;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

.message-sent {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    text-align: right;
}

.chat-input {
    display: flex;
    padding: 0.75rem;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    margin-right: 0.5rem;
}

/* Dashboard Styles */
.dashboard-stat {
    background-color: white;
    border-radius: 0.25rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease-in-out;
}

.dashboard-stat:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Responsive Styles */
@media (max-width: 767.98px) {
    .tracking-status {
        flex-direction: column;
    }
    
    .status-item {
        margin-bottom: 1rem;
    }
    
    .status-item:not(:last-child)::after {
        content: none;
    }
    
    .map-container {
        height: 300px;
    }
    
    .chat-container {
        height: 350px;
    }
}

/* Form Styles */
.form-section {
    background-color: white;
    border-radius: 0.25rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.form-section h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

/* Animation for status updates */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.status-update {
    animation: pulse 0.5s ease-in-out;
}

/* Additional utility classes */
.cursor-pointer {
    cursor: pointer;
}

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