/* --- General Layout --- */
.asap-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.asap-layout {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 20px;
}

.asap-order-list {
    flex: 1;
    min-width: 320px; /* Minimum width for order list */
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 15px;
}

.asap-map-container {
    flex: 2;
    min-width: 400px; /* Minimum width for map */
    position: sticky;
    top: 50px;
}

#asap-map-canvas {
    width: 100%;
    height: 500px;
    background-color: #e9e9e9;
    border-radius: 8px;
}

.asap-notice-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* --- Improved Driver Dashboard Card UI (V2) --- */
.asap-order-item-v2 {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}

.asap-order-item-v2.active,
.asap-order-item-v2:hover {
    border-color: #0073aa;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.asap-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.asap-card-header h3 {
    margin: 0;
    font-size: 16px;
}

.asap-card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.asap-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
}
.asap-info-row .dashicons {
    color: #555;
    margin-top: 2px;
}
.asap-info-row div {
    display: flex;
    flex-direction: column;
}
.asap-info-row strong {
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
}

.asap-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 10px;
}

.asap-footer-info {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #555;
    align-items: center;
}
.asap-footer-info .dashicons {
    vertical-align: middle;
    margin-right: 3px;
}

.asap-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.asap-action-btn, .asap-nav-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    color: white;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-align: center;
}
.asap-nav-btn .dashicons {
    font-size: 18px;
    height: 18px;
    width: 18px;
}

.asap-action-btn[data-action="claim_order"] { background-color: #28a745; }
.asap-action-btn[data-action="mark_picked_up"] { background-color: #ffc107; color: #333; }
.asap-action-btn[data-action="mark_delivered"] { background-color: #007bff; }
.asap-nav-btn { background-color: #17a2b8; }


/* --- Status Tags --- */
.asap-status {
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    text-transform: capitalize;
}

.status-pending, .status-assigned { background-color: #6c757d; }
.status-picked-up { background-color: #ffc107; color: #333; }
.status-delivered { background-color: #28a745; }


/* --- Customer Tracker --- */
.asap-customer-tracker {
    margin-top: 30px;
    border-top: 2px solid #eee;
    padding-top: 20px;
}

.asap-status-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 20px 0;
}
.asap-status-timeline::before {
    content: ''; position: absolute; top: 50%; left: 0; right: 0;
    height: 4px; background-color: #e0e0e0; transform: translateY(-50%); z-index: 1;
}
.asap-status-timeline .step {
    position: relative; z-index: 2; background-color: #fff; padding: 0 10px; color: #aaa; text-align: center;
}
.asap-status-timeline .step::before {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 20px; height: 20px; border-radius: 50%; background-color: #e0e0e0; border: 3px solid #fff; z-index: -1;
}
.asap-status-timeline .step.completed { color: #333; font-weight: bold; }
.asap-status-timeline .step.completed::before { background-color: #28a745; }