/* Completed Job Card - New Design */
.completed-job-card-new {
    background: #FFFFFF;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.05);
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

/* Card Header (Row 1) - Trip complete, date, time, price */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    font-size: 0.65em;
}

.header-left .trip-complete-badge {
    display: flex;
    padding: 0.25rem 0.5rem;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.375rem;
    background: var(--inactive, #BEBEBE);
}

/* Status badge variations */
.trip-complete-badge.status-enroute {
    background: var(--secondary, #666666);
}

.trip-complete-badge.status-active {
    background: var(--active, #28a745);
}

.trip-complete-badge.status-inactive {
    background: var(--inactive, #BEBEBE);
}

.trip-complete-badge.status-error {
    background: var(--error, #dc3545);
}

.trip-status-text {
    color: white;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.header-center .datetime-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.date-info,
.time-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Timer display */
.time-info {
    position: relative;
}

.timer-display {
    position: relative;
}

.timer-text {
    position: absolute;
    top: 0.8125rem;
    left: 0.25rem;
    font-size: 0.5625rem;
    width: 55%;
    text-align: center;
}

.date-icon,
.time-icon {
    width: 0.875rem;
    color: var(--primary);
}

.date-text,
.time-text {
    font-weight: 600;
    font-size: inherit;
    font-family: 'Montserrat', sans-serif;
    color: var(--primary);
}

.header-right .price-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
}

/* Footer Row (Row 4) - Waiting time, flight delay, customer icon, source name */
.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0.375rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    border-top: 0.1875rem dashed var(--bg);
    flex-wrap: wrap;
    position: relative;
}

.footer-row::before,
.footer-row::after {
    content: "";
    position: absolute;
    top: -0.9375rem;
    left: -0.8125rem;
    width: 1.625rem;
    height: 1.625rem;
    background: var(--bg);
    border-radius: 50%;
    z-index: 1;
}

.footer-row::after {
    left: auto;
    right: -0.8125rem;
}

.waiting-info {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.25rem 0;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.waiting-icon {
    font-size: 0.75rem;
}

.waiting-text {
    font-size: 0.75rem;
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
}

.flight-delay-info {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.25rem 0;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.flight-icon {
    font-size: 0.75rem;
}

.flight-text {
    font-size: 0.75rem;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
}

.customer-source-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customer-source-info img+svg {
    position: absolute;
    top: -0.3125rem;
    right: -0.5rem;
}

.customer-avatar {
    width: 1.250rem;
    height: 1.250rem;
    position: relative;
}

.customer-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.source-name {
    font-size: 0.75rem;
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
}

/* Driver and Actions (Row 3) - Same as current row 4 */

/* Journey Timeline (Row 2) - New structure with timeline-line */
.journey-timeline {
    padding: 1rem 0;
    position: relative;
}

/* Timeline Line Container */
.timeline-line {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 2.5rem;
    padding: 0 1.25rem;
    /* Increased padding to accommodate side labels */
}

/* Main line between start and end points */
.timeline-line::before {
    content: "";
    position: absolute;
    left: 6.25rem;
    /* Start from after the start point (5rem + 1.25rem) */
    right: 6.25rem;
    /* End before the end point (5rem + 1.25rem) */
    top: 50%;
    transform: translateY(-50%);
    height: 0.188rem;
    background: var(--inactive);
    z-index: 1;
}

/* Pre-pickup line (from car to start point) */
.pre-pickup-line {
    border: 0.125rem dashed white;
    position: absolute;
    left: 2.5rem;
    /* Start from car position (1.25rem + 1.25rem) */
    width: 2.5rem;
    /* Width to reach start point */
    top: 50%;
    transform: translateY(-50%);
    height: 0.188rem;
    background: var(--inactive);
    border-radius: 0.125rem;
    z-index: 1;
}

/* Active line styling */
.timeline-line.active-line::before {
    background: linear-gradient(to right,
            var(--primary) 0%,
            var(--primary) var(--progress, 0%),
            var(--inactive) var(--progress, 0%),
            var(--inactive) 100%);
}

/* Completed line styling */
.timeline-line.completed-line::before {
    background: var(--inactive, #BEBEBE);
}

/* Point Circle Base Styling */
.point-circle {
    background-color: var(--inactive);
    border-radius: 50%;
    height: 1.250rem;
    width: 1.250rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.point-circle i {
    font-size: 0.5625rem;
    color: white !important;
}

.point-circle img,
.point-circle svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* Start Point Positioning */
.point-circle.start-point {
    position: absolute;
    left: 5rem;
    /* Positioned to allow space for pickup time label */
}

/* End Point Positioning */
.point-circle.end-point {
    position: absolute;
    right: 5rem;
    /* Positioned to allow space for ETA label */
    background-color: var(--inactive);
}

/* Car Point for Active Jobs */
.point-circle.car-point {
    position: absolute;
    background-color: var(--primary);
    z-index: 3;
}

/* Car before pickup (en_route, driver_arrived) */
.point-circle.car-point.pre-pickup {
    left: 1.25rem;
    /* Positioned within the padded container */
}

/* Car during trip (passenger_on_board, in_progress) */
.point-circle.car-point.in-progress {
    transform: translateX(-50%);
    /* Position set inline via style="left: {{ $progress }}%" */
}

/* Remove pseudo-elements for moving car points only (no labels needed) */
.point-circle.car-point.pre-pickup::before,
.point-circle.car-point.pre-pickup::after,
.point-circle.car-point.in-progress::before,
.point-circle.car-point.in-progress::after {
    display: none;
}

/* Pickup time label on left of start point */
.pickup-time-label {
    position: absolute;
    left: 1.25rem;
    /* Aligned with container padding */
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    padding: 0.125rem 0.375rem;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

/* ETA label on right of end point */
.eta-time-label {
    position: absolute;
    right: 0.9375rem;
    /* Aligned with container padding */
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    padding: 0.125rem 0.375rem;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
}

/* Show time pseudo-element on left side of start point for specific job statuses */
.point-circle.start-point::before {
    content: attr(data-time);
    position: absolute;
    top: 50%;
    right: 1.5625rem;
    transform: translateY(-50%);
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    white-space: nowrap;
    padding: 0.125rem 0.375rem;
    font-family: 'Montserrat', sans-serif;
}

/* Hide time pseudo-element if no data-time attribute */
.point-circle:not([data-time])::before {
    display: none;
}

/* Hide time pseudo-element for end points in active timelines (using side label instead) */
.timeline-line.active-line .point-circle.end-point::before {
    display: none;
}

/* Hide pickup time pseudo-element for pre-pickup statuses (use side label when trip starts) */
.timeline-line.active-line .point-circle.start-point::before {
    display: none;
}

/* Show pickup time pseudo-element for in-progress and passenger_on_board statuses */
.timeline-line.active-line .point-circle.start-point.show-time::before {
    display: block;
}

.point-circle.start-point.bg-pr {
    background-color: var(--primary);
}

/* Show dropoff time pseudo-element on right side of end point for completed jobs */
.point-circle.end-point.show-time::before {
    content: attr(data-time);
    position: absolute;
    top: 50%;
    left: 1.5625rem;
    transform: translateY(-50%);
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    white-space: nowrap;
    background: white;
    padding: 0.125rem 0.375rem;
    font-family: 'Montserrat', sans-serif;
}

.point-circle::after {
    content: attr(data-location);
    position: absolute;
    bottom: -1.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.625rem;
    font-weight: 400;
    color: var(--text-secondary, #666);
    white-space: nowrap;
    background: white;
    padding: 0.125rem 0.375rem;
    font-family: 'Montserrat', sans-serif;
}

/* Adjust positioning for end point pseudo-elements */
.point-circle.end-point::before {
    left: 50%;
    transform: translateX(-50%);
}

.point-circle.end-point::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Timeline styling moved to .timeline-line - old styles cleaned up */

/* Driver and Actions (Row 4) */
.driver-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
}

.driver-section {
    display: flex;
    align-items: center;
}

.driver-info-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.driver-avatar {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.driver-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.default-avatar {
    font-size: 1.5rem;
    color: var(--primary);
}

.driver-name {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    margin: 0 0.25rem;
    color: var(--primary);
}

.payment-icon-btn {
    background: #5F808A;
    border: none;
    border-radius: 1rem;
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.payment-icon-btn i {
    font-size: 0.75rem;
    color: white !important;
}

.actions-section {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn {
    background: #FFFFFF;
    border: none;
    border-radius: 1rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.05);
    height: 1.5rem;
}

.share-btn {
    width: 1.625rem;
    background: transparent;
    box-shadow: none;
}

.share-btn i {
    font-size: 1rem;
}

.report-btn {
    color: #5F808A;
    background: #FFFFFF;
}

.payment-btn {
    background: #5F808A;
    color: white;
}

.supplier-payment-btn.paid {
    background: linear-gradient(86deg, #16AFD5 0%, #00FFC8 100%);
    color: white;
}

.share-btn {
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    width: 1.625rem;
    height: 1.625rem;
}

.cancel-btn {
    background: var(--error);
    color: white;
}

/* Legacy styles - keeping for backwards compatibility */
.completed-job-card-compact {
    background: var(--cards);
    border: 0.0625rem solid var(--borders);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.card-row:last-child {
    margin-bottom: 0;
}

/* Header Row */
.header-row .trip-status .status-text {
    color: var(--primary);
    font-size: 1.125rem;
    font-weight: 800;
}

.header-row .trip-price .price-text {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
}

/* Date & Reference Row */
.date-ref-row {
    justify-content: flex-start;
    gap: 0.375rem;
    font-weight: 300;
}

.date-ref-row .date-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 300;
}

.date-ref-row .reference-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 300;
}

/* Locations Row */
.locations-row {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.location-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

.location-icon {
    width: 1.250rem;
    height: 1.250rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
}

.pickup-dot {
    color: var(--accents);
    font-size: 0.5rem;
}

.dropoff-marker {
    color: var(--primary);
    font-size: 0.875rem;
}

.dropoff .location-details {
    text-align: right;
}

.location-details {
    flex: 1;
}

.location-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 0.125rem;
}

.fa-circle {
    color: var(--accents) !important;
}

.location-address {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

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

/* Driver & Actions Row */
.driver-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.completed-job-card-compact .driver-avatar {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.completed-job-card-compact .driver-avatar i {
    color: var(--text-secondary);
    font-size: 1.5rem;
}

.driver-details {
    display: flex;
    flex-direction: column;
}

.completed-job-card-compact .driver-name {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.trip-miles {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.completed-job-card-compact .action-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    min-width: 3.750rem;
    transition: all 0.2s ease;
}

.completed-job-card-compact .report-btn {
    background: var(--bg);
    color: var(--text-primary);
    border: 0.0625rem solid var(--borders);
}

.completed-job-card-compact .report-btn:hover {
    background: var(--borders);
    color: var(--text-primary);
    text-decoration: none;
}

.rate-btn {
    background: var(--accents);
    color: var(--text-contrast);
    border: 0.0625rem solid var(--accents);
}

.rate-btn:hover {
    background: #E27E00;
    color: var(--text-contrast);
    text-decoration: none;
}

/* Payment Row */
.payment-row {
    border-top: 0.0625rem solid var(--borders);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.payment-form {
    width: 100%;
}

.payment-request-btn {
    width: 100%;
    padding: 0.625rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--secondary);
    color: var(--text-contrast);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.payment-request-btn:hover {
    background: #5BC2AA;
}

.payment-request-btn.requested {
    background: var(--inactive);
    cursor: not-allowed;
}

.payment-request-btn.requested:hover {
    background: var(--inactive);
}

/* Payment Management Button */
.payment-management-btn {
    width: 100%;
    padding: 0.625rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.payment-management-btn:hover {
    background: #1F3A5F;
}

.view-details-btn {
    color: var(--primary);
}

.extras-btn {
    background-color: var(--accents);
    color: white;
}

.evidence-btn {
    background-color: var(--primary);
    color: white;
}


.prices {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.price-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.25rem 0.25rem 0 rgba(0, 0, 0, 0.05);
    position: relative;
}

.price-circle svg {
    position: absolute;
    top: -0.5rem;
    left: -0.5rem;
}

.price-circle.supplier-price {
    background: var(--primary);
}

.price-circle.driver-price {
    background: var(--secondary);
}

.price-circle span {
    color: white;
    font-weight: 600;
    text-align: center;
    font-size: 0.8rem;
}