/* Reset básico y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Asap-Regular';
    background-color: #FFFFFF;
    color: #4e4e4d;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Contenedor principal */
.container {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Tablas responsive */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

th {
    background-color: #f8f8f8;
    font-weight: 600;
}

/* Estilos para popups */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .popup-overlay.active {
        opacity: 1;
        visibility: visible;
      
    }

.popup-container {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-container {
    transform: translateY(0);
}

.popup-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .popup-header h3 {
        font-size: 1.3rem;
        color: #4e4e4d;
    }

.close-popup {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.popup-body {
    padding: 20px;
}

.popup-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: #2c3e50;
    color: white;
}

    .btn-primary:hover {
        background-color: #1a252f;
    }

/* Estilos para el header */
.header-top {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.logo-container {
    margin-bottom: 15px;
    text-align: center;
}

    .logo-container img {
        max-height: 50px;
        max-width: 100%;
    }


.tracking-number {
    font-family : 'Asap-BoldItalic';
}
    .tracking-number h1 {
    text-align: center;
    color: #2c3e50;
    font-family: 'Asap-Bold';
    font-size: x-large;
}

.tracking-number span {
    font-weight: 500;
    color: #e74c3c;
}

.header-status {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.status-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    align-self: center;
}

    .status-badge i {
        margin-right: 8px;
    }

    .status-badge.en-transito {
        background-color: #f39c12;
        color: white;
    }

    .status-badge.entregado {
        background-color: #27ae60;
        color: white;
    }

    .status-badge.pendiente {
        background-color: #3498db;
        color: white;
    }

.client-info {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
}

    .client-info p {
        margin-bottom: 5px;
    }

        .client-info p:last-child {
            margin-bottom: 0;
        }

/* Footer */
.tracking-footer {
    text-align: center;
    padding: 20px;
    margin-top: auto;
    color: #777;
    font-size: 0.9rem;
}

/* Estilos para la card */
.tracking-card {
    width: 100%;
    overflow: hidden;
    margin-bottom: 25px;
    background-color: white;
    box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);
    -webkit-box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);
    -moz-box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);

}

.card-header-red {
    background-color: #B90020;
    color: white;
    padding: 15px 20px;
}

    .card-header-red h2 {
        margin: 0;
        font-size: 1.3rem;
        font-weight: 600;
    }

.card-body {
    padding: 20px;
}

/* Grid layouts */
.parent {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(1, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

.div1 {
    grid-area: 1 / 1 / 4 / 3;
}

.div2 {
    grid-area: 1 / 3 / 4 / 6;
}

.parent2 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(1, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    margin-bottom: 15px;
}

.div3 {
    border-right: 1px solid #878787;
    text-align: center;
    grid-area: 1 / 1 / 2 / 3;
}

.div4 {
    text-align: center;
    grid-area: 1 / 3 / 2 / 6;
}

.parent3 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

.div5 {
    grid-area: 1 / 1 / 3 / 4;
}

.div6 {
    grid-area: 1 / 4 / 2 / 6;
}

.div7 {
    grid-area: 2 / 4 / 3 / 6;
}

.parent4 {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

.div8 {
    text-align: -webkit-center;
    grid-area: 1 / 1 / 2 / 2;
}

.div9 {
    text-align: -webkit-center;
    grid-area: 1 / 2 / 2 / 3;
}

.div10 {
    text-align: -webkit-center;
    grid-area: 1 / 3 / 2 / 4;
}

.parent_Ltiempo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

.div1_Ltiempo {
    grid-area: 1 / 1 / 2 / 2;
}

.div2_Ltiempo {
    grid-area: 1 / 2 / 2 / 3;
}

.div3_Ltiempo {
    grid-area: 1 / 3 / 2 / 4;
}

/* Timeline styles */
.timeline-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.timeline {
    position: relative;
    padding-left: -10px;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 87px;
        top: 10px;
        bottom: 10px;
        width: 1px;
        background-color: #ba0020;
        z-index: 1;
    }

.timeline-event {
    position: relative;
    margin-bottom: 25px;
    padding-left: 101px;
}

    .timeline-event:last-child {
        margin-bottom: 0;
    }

    .timeline-event::before {
        content: '';
        position: absolute;
        left: calc(85px - (12px / 2));
        top: 6px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: #ba0020;
        z-index: 2;
        border: 2px solid #fff;
    }

.event-date {
    position: absolute;
    left: 0px;
    top: 5px;
    width: 75px;
    text-align: left;
    color: #ba0020;
    font-size: 0.9em;
    font-weight: 300;
}

.event-content h3 {
    font-family: 'Asap-BoldItalic';
    color: #ba0020;
    font-size: 1.05em;
    font-weight: 500;
}

.event-content p {
    margin: 0 0 8px 0;
    color: #ba0020;
    font-size: 0.9em;
    line-height: 1.5;
}
/*
.timeline-event:nth-child(even)::before {
    background-color: #555555;
}

.timeline-event:nth-child(even) .event-date {
    color: #4e4e4d;
}

.timeline-event:nth-child(even) .event-content h3 {
    color: #4e4e4d;
}

.timeline-event:nth-child(even) .event-content p {
    color: #4e4e4d;
}*/

.payment-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
}

    .payment-link:hover {
        text-decoration: underline;
    }

/* Font faces */
@font-face {
    font-family: 'Asap-Bold';
    src: url('../fonts/Asap-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Asap-BoldItalic';
    src: url('../fonts/Asap-BoldItalic.ttf') format('truetype');
}

@font-face {
    font-family: 'Asap-Italic';
    src: url('../fonts/Asap-Italic.ttf') format('truetype');
}

@font-face {
    font-family: 'Asap-Regular';
    src: url('../fonts/Asap-Regular.ttf') format('truetype');
}

.header-vehicle {
    flex: 0 0 auto;
    max-width: 100%;
    text-align: right;
}

/* Media Queries */
@media (min-width: 576px) {
    html {
        font-size: 15px;
    }

    .header-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .logo-container {
        margin-bottom: 0;
    }

    .tracking-number h1 {
        text-align: right;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .container {
        max-width: 750px;
        padding: 0px;
    }

    .header-status {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .status-badge {
        margin-bottom: 0;
    }

    .client-info {
        width: 60%;
    }
    .parent_body{
        margin:20px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 970px;
    }

    .timeline-container {
        padding: 25px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 100%;
    }
}

@media (max-width: 400px) {
    th, td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .popup-container {
        width: 95%;
    }
}




/* Base styles for the modal - mobile only */
@media (max-width: 767px) {
    .tiktok-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        display: none;
        overflow: hidden;
    }

        .tiktok-modal.active {
            display: block;
        }

    /* Modal backdrop - mobile only */
    .modal-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .tiktok-modal.active .modal-backdrop {
        opacity: 1;
    }

    /* Modal content - mobile only */
    .modal-content {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #ffffff00;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        max-height: 90vh;
        overflow-y: auto;
    }

    .tiktok-modal.active .modal-content {
        transform: translateY(0);
    }

    /* Drag handle - mobile only */
    .modal-drag-handle {
        width: 40px;
        height: 4px;
        background-color: #ccc;
        border-radius: 2px;
        margin: 12px auto;
        cursor: pointer;
    }

    /* Modal body - mobile only */
    .modal-body {
      /*  padding: 0 16px 16px;*/
    }

    /* Prevent scrolling when modal is open - mobile only */
    body.modal-open {
        overflow: hidden;
    }
}

/* Desktop styles (original media query remains unchanged) */
@media (min-width: 768px) {
    .modal-content {
        width: 400px;
        left: 50%;
        transform: translate(-50%, 100%);
        border-radius: 12px;
        bottom: auto;
        top: 50%;
        max-height: 80vh;
    }

    .tiktok-modal.active .modal-content {
        transform: translate(-50%, -50%);
    }

    .modal-drag-handle {
        display: none;
    }
}

/* Close button styles (works for both mobile and desktop) */
.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
}


/* Timeline styles */
.timeline-container {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.timeline {
    position: relative;
    padding-left: -10px;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 87px;
        top: 10px;
        bottom: 10px;
        width: 1px;
        background-color: #ba0020;
        z-index: 1;
    }

.timeline-event {
    position: relative;
    margin-bottom: 25px;
    padding-left: 101px;
}

    .timeline-event:last-child {
        margin-bottom: 0;
    }

    .timeline-event::before {
        content: '';
        position: absolute;
        left: calc(85px - (12px / 2));
        top: 6px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: #555555; /* Color por defecto (gris) */
        z-index: 2;
        border: 2px solid #fff;
    }

    /* Solo el PRIMER evento en rojo */
    .timeline-event:first-child::before {
        background-color: #ba0020;
    }

.event-date {
    position: absolute;
    left: 0px;
    top: 5px;
    width: 75px;
    text-align: left;
    color: #4e4e4d; /* Color por defecto (gris oscuro) */
    font-size: 0.9em;
    font-weight: 300;
}

/* Solo la fecha del PRIMER evento en rojo */
.timeline-event:first-child .event-date {
    color: #ba0020;
}

.event-content h3 {
    font-family: 'Asap-BoldItalic';
    color: #4e4e4d; /* Color por defecto (gris oscuro) */
    font-size: 1.05em;
    font-weight: 500;
}

/* Solo el título del PRIMER evento en rojo */
.timeline-event:first-child .event-content h3 {
    color: #ba0020;
}

.event-content p {
    margin: 0 0 8px 0;
    color: #4e4e4d; /* Color por defecto (gris oscuro) */
    font-size: 0.9em;
    line-height: 1.5;
}

/* Solo el texto del PRIMER evento en rojo */
.timeline-event:first-child .event-content p {
    color: #ba0020;
}