/**
 * Delivery Tracker - Custom Styles
 * Theme colors are set via CSS custom properties from tenant config
 */

:root {
    --primary-color: #007ac3;
    --accent-color: #FE2B54;
    --header-bg: #3e5b80;
    --timeline-color: #198754;
}

/* Layout */
.widthcard {
    max-width: 1024px;
    width: 100%;
}

#map {
    height: 100%;
}

.logo {
    max-width: 100px;
    height: auto;
}

/* Theme colors */
.deepblue {
    background-color: var(--header-bg);
}

.theme-primary {
    background-color: var(--primary-color);
}

/* Accordion */
.accordion-button {
    font-size: 1.75rem;
}

/* Cupertino Pane theming - kept for backwards compatibility */
body.blue {
    --cupertino-pane-icon-close-color: #a8a7ae;
    --cupertino-pane-background: var(--primary-color);
    --cupertino-pane-color: #ffffff;
    --cupertino-pane-shadow: 0 4px 16px rgb(0 0 0 / 12%);
    --cupertino-pane-border-radius: 20px;
    --cupertino-pane-move-background: #ffffff;
    --cupertino-pane-destroy-button-background: #424246;
}

/* Bottom Sheet - CSS only approach */
.bottom-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1024px;
    background: var(--primary-color);
    border-radius: 20px 20px 0 0;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

.bottom-sheet.show {
    display: block;
}

.bottom-sheet-content {
    padding: 0.75em 1.5em 1em;
}

.bottom-sheet-content h1 {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin: 0 0 0.25em 0;
    text-align: center;
}

/* Timeline Styles */
#timeline {
    padding: 0.25em 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-item {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
}

.timeline-bullet {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20px;
    flex-shrink: 0;
    margin-right: 0.75em;
}

.timeline-bullet::before,
.timeline-bullet::after {
    content: '';
    width: 2px;
    background-color: rgba(255,255,255,0.3);
    flex: 1;
}

.timeline-item:first-child .timeline-bullet::before {
    background-color: transparent;
}

.timeline-bullet.last::after {
    background-color: transparent;
}

.bullet {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #fff;
    flex-shrink: 0;
}

.timeline-content {
    padding: 0.5em 0;
    flex: 1;
}

.timeline-eta {
    display: flex;
    align-items: center;
    gap: 0.75em;
}

.timeline-eta .timeline-title {
    border-right: 1px solid rgba(255,255,255,0.5);
    padding-right: 0.75em;
}

.timeline-eta .eta-value {
    border-right: none;
    padding-right: 0;
}

.timeline-title {
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    font-weight: 400;
    margin: 0;
}

.timeline-subtitle {
    font-size: clamp(0.65rem, 2vw, 0.8rem);
    margin: 0.1em 0 0 0;
}

/* Carrier Logo */
.carrier-logo {
    display: flex;
    justify-content: center;
    padding-top: 0.5em;
}

.carrier-logo-wrapper {
    background: #fff;
    border-radius: 2rem;
    padding: 0.5em 1em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carrier-logo-wrapper img {
    max-height: clamp(25px, 6vw, 40px);
    max-width: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .accordion-button {
        font-size: 1rem;
    }
    
    .bottom-sheet-content {
        padding: 0.75em 1.5em;
    }
    
    .timeline-bullet {
        margin-right: 0.75em;
    }
    
    .timeline-bullet::before {
        height: 0.75em;
    }
    
    .timeline-bullet::after {
        height: 1em;
    }
    
    .carrier-logo-wrapper {
        padding: 0.5em 1em;
    }
}

@media (max-width: 480px) {
    .bottom-sheet-content {
        padding: 0.5em 1em;
    }
    
    .timeline-bullet {
        margin-right: 0.5em;
        min-width: 16px;
    }
    
    .timeline-eta {
        gap: 0.5em;
    }
    
    .timeline-eta .timeline-title {
        padding-right: 0.5em;
    }
}

/* Loading/Error states */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.error-message {
    color: #dc3545;
    padding: 1rem;
    text-align: center;
}

/* Hide class */
.d-none {
    display: none !important;
}
