* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif
}

body {
    background-image: url("images/bg.png");
    background-color: #ebb5864d;
    background-size: cover;  
    background-position: center; 
    background-repeat: no-repeat; 
    background-attachment: fixed;
}

@media (max-width: 768px) {
    body {
        background-size: center; 
    }
}

  /*----------------*/
 /*     HEADER     */
/*----------------*/
header {
    background-color: #ffae01;
    width: 100%;
    margin: 0;
    padding: 0;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.lx-pic {
    width: clamp(200px, 30%, 250px);
    margin: 0;
    padding: 0;
}

.home-button {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 20px;
    margin-right: 10px;
    border-radius: 5px;
    background-color: #7d0370;
    color: white;
    border: none;
    cursor: pointer;
    transition: box-shadow 250ms;
}

  /*----------------*/
 /*     MAIN       */
/*----------------*/
main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 3rem 0;
}

.main-content {
    text-align: center;
}

.main-content-form {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

main h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    border-radius: 10px;
    font-size: clamp(2rem, 3vw, 2.5rem);
}

.input-box{
    flex-wrap: wrap;
    width: 600px;
    padding: 10px;
    border-radius: 5px 0 0 5px;
    border: none;
    background: #d8d8d8;
    margin: 0;
    font-size: clamp(1rem, 1vw, 1rem);
    text-align: center;
}

@media (max-width: 768px) {
    .input-box {
        max-width: 320px; 
        text-align: center;
    }
}

.input-box:focus {
    outline: none;
    box-shadow: none;
    background-color: rgb(224, 224, 224);
}

  /*----------------*/
 /*     BUTTON     */
/*----------------*/

button {
    font-family: inherit;
    font-size: clamp(1rem, 1vw, 1rem);
    background: #ff8800;
    color: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

button span {
    display: block;
    margin-left: 0.3em;
    transition: all 0.3s ease-in-out;
}

button svg {
    display: block;
    transform-origin: center center;
    transition: transform 0.3s ease-in-out;
}

button:hover .svg-wrapper {
    animation: fly-1 0.6s ease-in-out infinite alternate;
}

button:hover svg {
    transform: translateX(1.2em) rotate(45deg) scale(1.1);
}

button:hover span {
    transform: translateX(5em);
}

button:active {
    transform: scale(0.95);
}
  
  @keyframes fly-1 {
    from {
      transform: translateY(0.1em);
    }
  
    to {
      transform: translateY(-0.1em);
    }
  }

.no-tracking-number {
    font-weight: bold;
    color: white;
    padding: 10px 15px;
    border: 1px solid red;
    border-radius: 50px;
    display: flex;
    background-color: red;;
}


main img {
    width: 90px;
    margin: 0;
    padding: 0;
}

main .track {
    display: flex;
    justify-content: center;
    align-items: end;
    margin: 0;
}

  /*----------------*/
 /*     FOOTER     */
/*----------------*/
footer {
    background-color: white;
    color: black;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    position: fixed;
    bottom: 0;
    border: black 2px solid;
    border-bottom: none;
    border-right: none;
    border-left: none;
}

@media (max-width: 425px) {
    footer {
        width: 100%;
        position: fixed;
        bottom: 0;
        padding: 0;
        margin: 0;
    }

    footer ul {
        display: flex;
        flex-direction: row;
        justify-content: center;
        padding: 0;
        margin: 0;
    }
}

footer .Contact{
    font-size: 15px;
    font-weight: bold;
}

footer ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li {
    font-size: 12px;
    margin: 10px 10px;
}

footer p {
    font-size: 12px;
    margin: 0;
}

  /*----------------*/
 /*      API       */
/*----------------*/
.tracking_updates {
    text-align: center;
}


  /*----------------*/
 /*     TRUCK      */
/*----------------*/
.loader {
    width: fit-content;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
}

.truckWrapper {
    width: 200px;
    height: 100px;
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
    justify-content: flex-end;
    overflow-x: hidden;
}
    /* truck upper body */
.truckBody {
    width: 130px;
    height: fit-content;
    margin-bottom: 6px;
    animation: motion 1s linear infinite;
}
    /* truck suspension animation*/
    @keyframes motion {
            0% 
        {
            transform: translateY(0px);
        }

            50% 
        {
            transform: translateY(3px);
        }

            100% 
        {
            transform: translateY(0px);
        }
    }

    /* truck's tires */
.truckTires {
    width: 130px;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 10px 0px 15px;
    position: absolute;
    bottom: 0;
}

.truckTires svg {
    width: 24px;
}

.road {
    width: 100%;
    height: 1.5px;
    background-color: #282828;
    position: relative;
    bottom: 0;
    align-self: flex-end;
    border-radius: 3px;
}

.road::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 100%;
    background-color: #282828;
    right: -50%;
    border-radius: 3px;
    animation: roadAnimation 1.4s linear infinite;
    border-left: 10px solid white;
    }
.road::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 100%;
    background-color: #282828;
    right: -65%;
    border-radius: 3px;
    animation: roadAnimation 1.4s linear infinite;
    border-left: 4px solid white;
}

.lampPost {
    position: absolute;
    bottom: 0;
    right: -90%;
    height: 90px;
    animation: roadAnimation 1.4s linear infinite;
}

    @keyframes roadAnimation {
        0% 
        {
            transform: translateX(0px);
        }
        100% 
        {
            transform: translateX(-350px);
        }
    }


  /*----------------*/
 /*      TABLE     */
/*----------------*/
table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: hidden;
    text-align: center;
}

.table th, .table td {
    padding: 10px;
    vertical-align: middle;
    border: none;
}

.table td {
    padding: 15px 30px;
    text-align: left;
    color: #333;
}

.table th {
    background-color: #434058;
    color: white;
    padding: 15px;
    text-align: center;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #F8F8F8;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: gray;
}

.table-responsive {
    width: 100%;
    border-radius: 10px;
    overflow-y: auto; /* Enables horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    box-shadow: 8px 8px 20px 0px #c92a128c;
}

table {
    width: 100%;
    white-space: wrap; /* Prevents text from wrapping */
}

.check {
    width: 15px;
}

.tracking_updates {
    margin-bottom: 15px;
}


/* General adjustments for smaller screens */
@media (max-width: 375px) {

    .header-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .lx-pic {
        width: 150px; /* Adjust logo size */
    }

    .home-button {
        font-size: 12px;
        padding: 5px 15px;
        margin: 5px 0;
    }

    .input-box {
        width: 100%; /* Full width for input box */
        max-width: none;
        font-size: 16px;
        text-align: center;
    }

    .track-search-button {
        border-radius: 0 10px 10px 0;
        padding: 10px;
    }

    .tracking_updates {
        font-size: 1.2rem; /* Adjust heading size */
    }

    .table {
        flex-wrap: wrap;
        font-size: 12px; 
    }

    .table th, .table td {
        padding: 8px; 
    }

    footer {
        font-size: 10px; 
        padding: 5px 0;
    }

    footer ul li {
        margin: 5px;
    }
}

/* Additional adjustments for very small screens (320px and below) */
@media (max-width: 320px) {
    .input-box {
        font-size: 14px; 
    }

    .track-search-button {
        font-size: 14px; 
    }

    .table th, .table td {
        font-size: 10px; 
    }

    .tracking_updates {
        font-size: 1rem; 
    }

}

/* Testing */

.input-wrapper {
    width: fit-content;
    height: 45px;
    border-radius: 20px;
    padding: 5px;
    box-sizing: content-box;
    display: flex;
    align-items: center;
    background-color: #292524;
    margin: 15px;
}

.icon {
    width: 30px;
    fill: rgb(255, 255, 255);
    margin-left: 8px;
    transition: all 0.3s;
}
.input {
    max-width: 200px;
    height: 100%;
    border: none;
    outline: none;
    padding-left: 0px;
    background-color: #292524;
    color: white;
    font-size: 1em;
    text-align: center;
}
.input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #292524 inset;
    -webkit-text-fill-color: #ffffff;
}