/* Custom styles for AsapLoads */

/* PWA Install Popup */
.pwa-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.pwa-popup.show {
    animation: fadeIn 0.3s ease;
}

.pwa-popup-content {
    background: linear-gradient(135deg, #1e3a8a 0%, #002868 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
}

.pwa-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.pwa-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.pwa-popup-icon {
    font-size: 60px;
    color: #60a5fa;
    margin-bottom: 20px;
}

.pwa-popup-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 700;
}

.pwa-popup-content p {
    font-size: 16px;
    margin-bottom: 25px;
    opacity: 0.9;
    line-height: 1.5;
}

.pwa-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-install-popup {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
}

.btn-install-popup:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.6);
}

.btn-cancel-popup {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-popup:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .pwa-popup-content {
        padding: 30px 20px;
    }
    
    .pwa-popup-icon {
        font-size: 50px;
    }
    
    .pwa-popup-content h3 {
        font-size: 20px;
    }
    
    .pwa-popup-content p {
        font-size: 14px;
    }
}

/* Card styles */
.card {
    transition: all 0.3s ease;
    border-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
}

.card-body {
    border-radius: 10px;
}

/* Better separation for sections */
.section-title {
    border-left: 4px solid var(--bs-primary);
    padding-left: 10px;
    margin-bottom: 20px;
}

/* Improved button styles */
.btn {
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Dashboard card styles */
.card .display-4 {
    font-weight: 600;
}

/* Map containers */
.map-container {
    height: 300px;
    margin-top: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Map popup customization */
.leaflet-popup-content-wrapper {
    background-color: #343a40;
    color: #fff;
    border-radius: 8px;
}

.leaflet-popup-tip {
    background-color: #343a40;
}

/* Custom styles for Leaflet controls in dark theme */
.leaflet-control-zoom a {
    background-color: #343a40;
    color: #fff;
    border-color: #495057;
}

.leaflet-control-zoom a:hover {
    background-color: #495057;
}

/* For the map attribution in dark theme */
.leaflet-control-attribution {
    background-color: rgba(52, 58, 64, 0.8) !important;
    color: #adb5bd !important;
}

.leaflet-control-attribution a {
    color: #6c757d !important;
}

/* Improved form control styling */
.form-control, .form-select {
    border-radius: 5px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

/* Message styling */
.message-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.message-bubble {
    border-radius: 18px;
    padding: 10px 15px;
    margin-bottom: 10px;
    max-width: 75%;
    position: relative;
}

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

.message-received {
    background-color: var(--bs-dark);
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-info {
    font-size: 0.75rem;
    margin-top: 5px;
    opacity: 0.8;
}

/* Tracking timeline */
.tracking-timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.tracking-timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--bs-secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.tracking-container {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.tracking-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bs-primary);
    border: 4px solid var(--bs-primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.tracking-left {
    left: 0;
}

.tracking-right {
    left: 50%;
}

.tracking-right::after {
    left: -10px;
}

.tracking-content {
    padding: 20px;
    background-color: var(--bs-dark);
    position: relative;
    border-radius: 6px;
}

/* Custom status badges */
.badge-pending {
    background-color: var(--bs-warning);
    color: var(--bs-dark);
}

.badge-accepted {
    background-color: var(--bs-primary);
}

.badge-completed {
    background-color: var(--bs-success);
}

.badge-rejected {
    background-color: var(--bs-danger);
}

/* Logout button styling */
.btn-outline-danger {
    border-width: 2px;
}

/* Navbar improvements */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* Additional responsive adjustments */
@media (max-width: 767.98px) {
    .tracking-timeline::after {
        left: 31px;
    }
    
    .tracking-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .tracking-right {
        left: 0%;
    }
    
    .tracking-left::after, .tracking-right::after {
        left: 21px;
    }
}