/* Base styling */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    text-align: center;
}

/* Header styling for larger screens using grid layout */
header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 20px 0;
    background-color: #fff;
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
}

.delivered-header {
    color: green;
}

header .logo {
    height: 75px;
    margin-left: 20px;
}

header h1 {
    margin: 0;
    font-family: 'Bebas Neue', cursive;
    font-size: 3em;
    justify-self: center;
}

/* The right placeholder: same width as the logo */
.header-right {
    width: 75px; /* Adjust if necessary */
    margin-right: 20px;
}

/* Main content styling */
main {
    margin: 40px auto;
    max-width: 800px;
}

/* Form styling: display input and button side by side on larger screens */
form {
    display: inline-flex;
    align-items: stretch;
    justify-content: center;
    margin-bottom: 20px;
}

input[type="text"] {
    width: 300px;
    padding: 10px;
    font-size: 1.2em;
    border: 1px solid #ccc;
    border-radius: .75rem;
    margin-right: 10px;
}

button[type="submit"] {
    font-family: 'Bebas Neue', cursive;
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 10px 20px;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: .75rem;
    transition: background-color 0.3s, color 0.3s;
}

button[type="submit"]:hover {
    background-color: #E30613;
    color: #fff;
}

/* Results styling */
.error {
    color: #E30613;
}

#results {
    margin-top: 40px;
    text-align: left;
}

/* Shipment styling */
.shipment {
    background: #fff;
    padding: 15px;
    margin-bottom: 20px;
    /*border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);*/
}

.shipment h2 {
    margin-top: 0;
}

/* Events grouping styling */
.event-group {
    margin-top: 20px;
    border-top: 1px solid #ccc;
    padding-top: 10px;
}

.event-group h3 {
    margin: 10px 0;
}

/* Timeline container */
.timeline {
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Continuous vertical line */
.timeline::before {
    content: "";
    position: absolute;
    left: 6px;  /* Adjusted to be exactly half of the dot width (14px/2 = 7px) minus half the line width (2px/2 = 1px) */
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: #ccc;
}

/* Event row container */
.timeline li {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

/* Dot column */
.timeline li .timeline-dot {
    flex: 0 0 14px;  /* Matches dot width */
    height: 14px;
    position: relative;
    margin-right: 10px;
}

/* The dot itself */
.timeline li .timeline-dot::before {
    content: "";
    position: absolute;
    left: 0;
    width: 14px;
    height: 14px;
    background: lightgrey;
    border-radius: 50%;
    z-index: 1;
}

/* Delivered dot style */
.timeline li .timeline-dot.delivered::before {
    background: green;
    width: 18px;
    height: 18px;
    left: -2px;
}
.timeline li .timeline-dot.onhold::before {
    background: #E30613;
    /* Optionally, adjust size if needed; for example: */
    width: 18px;
    height: 18px;
    left: -2px;
}


/* Event content */
.timeline li .timeline-item {
    flex: 1;
    padding-left: 10px;
}

/* Event text styling */
.events .time {
    font-weight: bold;
}

.remarks {
    margin-top: 5px;
    margin-left: 20px;
    list-style: disc;
}

/* Mobile-friendly adjustments */
@media (max-width: 600px) {
    /* Switch header to column layout */
    header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px 10px;
    }
    header .logo {
        height: 60px;
        margin: 0 0 10px 0;
    }
    header h1 {
        text-align: center;
    }
    .header-right {
        display: none;
    }

    form {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0 auto;
    }
    form input[type="text"],
    form button[type="submit"] {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    form input[type="text"] {
        margin-bottom: 10px;
    }
}
