﻿html {
    position: relative;
    min-height: 100%;
}

body {
    font-family: "Montserrat", sans-serif;
    background: #f3f4f7;
}

.legend-header {
    background-color: #9dbd76;
    color: #fff;
}


/* Carousel */
.carousel-caption p {
    font-size: 20px;
    line-height: 1.4;
}

/* Make .svg files in the carousel display properly in older browsers */
.carousel-inner .item img[src$=".svg"] {
    width: 100%;
}







/* Hide/rearrange for smaller screens */
@media screen and (max-width: 500px) {
    /* Hide captions */
    .carousel-caption {
        display: none;
    }

    .trip-number-row {
        flex-direction: column;
    }

    .carrier-input,
    .trip-input-wide {
        flex: 1 1 100%;
    }

    /* Force each LI inside .navbar-collapse to be full width */
    .navbar-collapse .navbar-nav > li,
    .navbar-collapse .navbar-right > li {
        float: none !important;
        width: 100%;
    }

        /* Ensure all anchors take full row */
        .navbar-collapse .navbar-nav > li > a,
        .navbar-collapse .navbar-right > li > a {
            text-align: left !important;
            font-size: 15px !important;
            width: 100%;
        }

    /* Fix navbar-text drifting left/right */
    .navbar-collapse .navbar-text {
        float: none !important;
        width: 100%;
        padding: 10px 15px;
        text-align: left !important;
    }

    .mobile-expand {
        display: block !important;
    }

    .table-responsive {
        border: none !important;
    }


    .modern-table thead {
        display: none;
    }

    .modern-table,
    .modern-table tbody,
    .modern-table tr,
    .modern-table td {
        display: block;
        width: 100%;
    }

        .modern-table tr {
            margin-bottom: 1rem;
            background: #f8faff !important;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
            padding: 1rem;
            border: 1px solid #e0e7ff;
        }

        .modern-table td {
            display: flex;
            padding: 8px 0px !important;
            border: none !important;
            width: 100%;
            font-size: 1.7rem;
        }

    td[data-label="Completed"]:not(:has(input:checked))::before {
        content: "Not Completed" !important;
        font-weight: 700;
        color: #c00;
    }

    /* Completed column: completed (checked) */
    td[data-label="Completed"]:has(input:checked)::before {
        content: "Completed" !important;
        font-weight: 700;
        color: #090;
    }




    /* Only show Stop and Completed on mobile */
    .modern-table tr:not(.expanded) td:not([data-label="Stop"]):not([data-label="Completed"]):not([data-label="Trip"]):not([data-label="Stop"]):not([data-label="Date"]):not(.mobile-expand):not([data-label="Empty Racks Returned"]) {
        display: none;
    }

    /* Show label before content */
    .modern-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #555;
        flex: 1;
        text-align: left;
    }




    /* Move check box to right*/
    .custom-checkbox {
        margin-right: -5px !important;
    }
}


/* Hide/rearrange for smaller screens */
@media screen and (min-width: 501px) and (max-width: 767px) {
    /* Hide captions */
    .carousel-caption {
        display: none;
    }

    .trip-number-row {
        flex-direction: column;
    }

    .carrier-input,
    .trip-input-wide {
        flex: 1 1 100%;
    }

    /* Force each LI inside .navbar-collapse to be full width */
    .navbar-collapse .navbar-nav > li,
    .navbar-collapse .navbar-right > li {
        float: none !important;
        width: 100%;
    }

        /* Ensure all anchors take full row */
        .navbar-collapse .navbar-nav > li > a,
        .navbar-collapse .navbar-right > li > a {
            text-align: left !important;
            font-size: 15px !important;
            width: 100%;
        }

    /* Fix navbar-text drifting left/right */
    .navbar-collapse .navbar-text {
        float: none !important;
        width: 100%;
        padding: 10px 15px;
        text-align: left !important;
    }

    .mobile-expand {
        display: block !important;
    }

    .table-responsive {
        border: none !important;
    }


    .modern-table thead {
        display: none;
    }

    .modern-table,
    .modern-table tbody,
    .modern-table tr,
    .modern-table td {
        display: block;
        width: 100%;
    }

        .modern-table tr {
            margin-bottom: 1rem;
            background: #f8faff !important;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.12);
            padding: 1rem;
            border: 1px solid #e0e7ff;
        }

        .modern-table td {
            display: flex;
            padding: 8px 75px !important;
            border: none !important;
            width: 100%;
            font-size: 1.7rem;
        }

    td[data-label="Completed"]:not(:has(input:checked))::before {
        content: "Not Completed" !important;
        font-weight: 700;
        color: #c00;
    }

    /* Completed column: completed (checked) */
    td[data-label="Completed"]:has(input:checked)::before {
        content: "Completed" !important;
        font-weight: 700;
        color: #090;
    }




    /* Only show Stop and Completed on mobile */
    .modern-table tr:not(.expanded) td:not([data-label="Stop"]):not([data-label="Completed"]):not([data-label="Trip"]):not([data-label="Stop"]):not([data-label="Date"]):not(.mobile-expand):not([data-label="Empty Racks Returned"]) {
        display: none;
    }

    /* Show label before content */
    .modern-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #555;
        flex: 1;
        text-align: left;
    }




    /* Move check box to right*/
    .custom-checkbox {
        margin-right: -5px !important;
    }
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .jumbotron {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .container .jumbotron,
    .container-fluid .jumbotron {
        padding-right: 0px;
        padding-left: 0px;
    }

    .jumbotron h1,
    .jumbotron .h1 {
        font-size: 63px;
    }


    .stopHeader .stop-actions {
        margin-top: 0;
    }

    .stopHeader {
        flex-direction: row;
        justify-content: center;
    }

        .stopHeader .trip-info {
            margin-right: 2rem;
        }
 

}


 
/*Fernlea theme Logo*/
.jumbotron {
    color: inherit;
    background-color: #9dbd76;
}


.container .jumbotron,
.container-fluid .jumbotron {
    border-radius: 0px;
}

.jumbotron .container {
    max-width: 100%;
}

/* Fernlea Theme NavBar*/
.navbar-default {
    background-color: #9dbd76;
    border-color: #e7e7e7;
    margin: 0px;
}

    .navbar-default .navbar-brand {
        color: #000;
    }

        .navbar-default .navbar-brand:hover,
        .navbar-default .navbar-brand:focus {
            color: #000;
            background-color: transparent;
        }

    .navbar-default .navbar-text {
        color: #000;
    }

    .navbar-default .navbar-nav > li > a {
        color: #000;
        text-decoration: none;
    }

.navbar-li {
    display: flex;
    align-items: center;
    margin-right: 10px;
    margin-top: 0px;
}


/* PAGE CONTAINER */
.tray-container {
    padding-top: 5px;
}

/* CARD APPLE STYLE */
.card-apple {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #e4e7ec;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    margin-bottom: 0px;
    position: relative;
}



/* HEADER FILTER */


.dashboard-header label {
    font-weight: 600;
    font-size: .9rem;
    color: #111;
}

.filter-pill {
    width: 100%;
    border-radius: 50px;
    padding: 8px 14px;
    border: 2px solid #ccd2da;
    background: #f8fafc;
    font-weight: 600;
    transition: .2s;
}

    .filter-pill:hover {
        border-color: #007aff;
    }

/* TABLE */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0 10px;
}


    .modern-table thead th {
        position: sticky;
        top: 0;
        background: #21232a;
        color: #fff;
        text-transform: uppercase;
        border: none;
        padding: 14px;
        font-size: .78rem;
        letter-spacing: .5px;
    }

    .modern-table tbody tr {
        background: #ffffff;
        border-bottom: 1px solid #e0e0e0;
        border-radius: 14px;
        transition: background-color 0.3s ease;  
    }

        .modern-table tbody tr:hover {
            transform: translateY(0);
            box-shadow: 0 4px 10px rgba(0,0,0,0.08);
            background-color: #f9f9f9;
        }

    .modern-table th,
    .modern-table td {
        text-align: center;  
        vertical-align: middle;  
    }
    .modern-table td .form-check {
        justify-content: center;
        align-items: center;
    }

td {
    padding: 13px 12px;
    border: none;
    font-size: .9rem;
}

/* Dashboard table */
.modern2-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0 10px;
}


    .modern2-table thead th {
        position: sticky;
        top: 0;
        background: #21232a;
        color: #fff;
        text-transform: uppercase;
        border: none;
        padding: 14px;
        font-size: .78rem;
        letter-spacing: .5px;
    }

    .modern2-table tbody tr {
        background: #ffffff;
        border-bottom: 1px solid #e0e0e0;
        border-radius: 14px;
        transition: background-color 0.3s ease;
    }

        .modern2-table tbody tr:hover {
            transform: translateY(0);
            box-shadow: 0 4px 10px rgba(0,0,0,0.08);
            background-color: #f9f9f9;
        }

    .modern2-table th,
    .modern2-table td {
        text-align: center;
        vertical-align: middle;
    }

        .modern2-table td .form-check {
            justify-content: center;
            align-items: center;
        }
 
td {
    padding: 13px 12px;
    border: none;
    font-size: .9rem;
}


/* SHIMMER LOADING */
.loading {
    height: 180px;
    border-radius: 14px;
    display: none;
}

#loadingState {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 180px;
    z-index: 2;
}

.shimmer {
    background: linear-gradient(90deg, #ececec 25%, #f7f7f7 37%, #ececec 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

/* ANIMATIONS */
.fade-in {
    animation: fade-in .4s ease-in-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down {
    animation: slide-down .35s ease-out;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filters */

.filter-panel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 15px rgba(0,0,0,0.15);
    padding: 20px;
    transition: right 0.3s ease-in-out;
    z-index: 9999;
}

    .filter-panel.open {
        right: 0;
    }

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.button-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    align-items: center !important;
    flex-wrap: nowrap;
    margin-bottom: 5px;
}

.filter-btn, .export-btn {
    background-color: #9dbd76;
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 8px 16px;
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    transition: opacity 0.2s ease-in-out;
    white-space: nowrap;
}

    .filter-btn:hover, .export-btn:hover {
        opacity: 0.85;
    }

 

/* Trip Page Styles */

.trip-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.trip-header {
    text-align: center;
    margin-bottom: 15px;
}

    .trip-header h1 {
        font-size: 38px;
        font-weight: 700;
        margin: 0;
    }

    .trip-header p {
        font-size: 12px;
        color: #555;
        margin-top: 4px;
    }
 
.trip-input {
    width: 100%;
    padding: 12px;
    font-size: 20px;
    text-align: center;
    border: 1px solid black;
    border-radius: 4px;
}


 

.trip-button-container {
    text-align: center;
    margin-top: 30px;
}

.trip-next-btn {
    background: #9dbd76;
    color: #000;
    padding: 12px 80px;
    border: 1px solid black;
    border-radius: 4px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
}

    .trip-next-btn:hover {
        background: #7ab344;
    }



.log-btn {
    background: #9dbd76;
    color: #000;
    padding: 6px 6px;
    border: 1px solid black;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

    .trip-btn:hover {
        background: #7ab344;
    }



/*Driver Call input Form*/
.driver-form {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-row label {
    font-weight: 600;
    margin-bottom: 5px;
}

.form-row input,
.form-row textarea {
    padding: 10px;
    border: 1px solid #888;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
}

textarea {
    height: 140px;
    resize: none;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.hidden {
    display: none;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #84c441;
    border: none;
    color: white;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
}

.submit-btn:hover {
    background: #72b136;
}



.readonly-row {
    border-radius: 5px;
}

    .readonly-row input[readonly] {
        background-color: #e0e0e0; /* match container */
        color: #000; /* black text */
    }

/* Hide the default checkbox */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid gray;
    border-radius: 4px;
    position: relative;
    cursor: default;
    background-color: white;
}

    /* Checked state */
    .custom-checkbox:checked {
        background-color: #9dbd76;
        border-color: #9dbd76;
    }

        /* Add a checkmark */
        .custom-checkbox:checked::after {
            content: '✔';
            position: absolute;
            top: -3px;
            left: 2px;
            font-size: 16px;
            color: white;
        }



/*  stop Header*/
.stopHeader {
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
 

.stopHeader .trip-info h2 {
    margin-bottom: 0.25rem; 
    font-weight: 700; 
    color: #0d6efd; 
    text-align: center;
}

.stopHeader .trip-info p {
    margin-bottom: 0; 
    color: #6c757d; 
}

.stopHeader .stop-actions {
    margin-top: 0.5rem; 
}

 


/*Success message*/

.toast-success {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 9999;
}

.toast-success.show {
    bottom: 40px;
    opacity: 1;
}
/*Error message*/

.toast-error {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: red;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 9999;
}

    .toast-error.show {
        bottom: 40px;
        opacity: 1;
    }

 
.mobile-expand {
    display: none;
}
.show-more-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 1.3rem; /* adjust icon size */
    color: inherit; /* keeps same text color */
}

    .show-more-btn:focus {
        outline: none;
    }

.mobile-expand i {
    pointer-events: none;
}


.delete-btn {
    background: none !important;
    border: none !important;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 1.3rem;
    color: #dc3545; /* Bootstrap danger color */
}


.trip-number-row {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

/* Carrier Code = 30% width */
.carrier-input {
    flex: 0 0 30%;
}

/* Trip Number = 70% width */
.trip-input-wide {
    flex: 1; /* takes remaining space */
}

 