@import url("../../../../styles/colors.css");

.more-than__head {
    gap: 24px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.more-than__title {
    color: var(--color-text-dark);
}

.more-than__title .text-accent {
    color: var(--Brand-Primary-100, #112AD4);
}

.more-than__subtitle {
    max-width: 415px;
    color: var(--color-muted-blue-gray);
}

.more-than .feature-tabs {
    height: clamp(464px, 32.2vw, 518px);
}

.more-than__panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.more-than__panel--route-history,
.more-than__panel--hos-visibility,
.more-than__panel--alerts {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

/*.more-than__panel--route-history .feature-tabs__panel-desc {*/
/*    max-width: 408px;*/
/*}*/

.more-than__panel--route-history .feature-tabs__panel-content {
    margin-top: 0;
    margin-left: auto;
    margin-right: -28px;
    flex-shrink: 0;
}

.more-than__image--route-history {
    width: 438px;
    height: 429px;
    max-width: none;
    flex-shrink: 0;
}

/*.more-than__panel--hos-visibility > div:first-child {*/
/*    flex-shrink: 0;*/
/*}*/

.more-than__panel--hos-visibility .feature-tabs__panel-content {
    margin-top: 0;
    margin-left: auto;
    margin-right: -48px;
    flex-shrink: 0;
}

.more-than__image--duty-status {
    height: 100%;
    width: auto;
    max-width: none;
    flex-shrink: 0;
}

.more-than__image--hos-rings {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 23.5%;
    width: auto;
    transform: translateX(-40%);
}

.more-than__panel--alerts .feature-tabs__panel-content {
    margin-top: 0;
    margin-left: auto;
    margin-right: -30px;
    flex-shrink: 0;
}

.more-than__image--alert {
    height: 100%;
    width: auto;
    max-width: none;
    flex-shrink: 0;
}

.more-than__panel-content {
    margin-top: 41px;
    height: 100%;
    display: flex;
}

.more-than__image--track-link {
    /*max-width: 808px;*/
    width: 97.7%;
}

.more-than__image--active-links {
    max-width: 307px;
    width: 100%;

    position: absolute;
    top: 0;
    right: 0;
    /*transform: translate(30px, -50%);*/
    transform: translate(25px, -31%);
}

.feature-tabs__item-block {
    flex: 1;
    flex-direction: column;
    display: flex;
}

.feature-tabs__item {
    gap: 12px;
}

.feature-tabs__item-label {
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%; /* 24px */
    text-align: left;
}

.feature-tabs__item-sublabel {
    color: var(--color-text-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 145%; /* 15.95px */
    text-align: left;
}

.more-than__subtitle {
    color: var(--color-muted-blue-gray, #41537A);
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.more-than__subtitle b {
    font-weight: 500;
}

.feature-tabs__panels {
    padding: 32px;
}

.feature-tabs__panel-title {
    margin: 0;
    padding: 0;
}

.section-tag {
    margin-bottom: 0;
    align-items: center;
}

.feature-tabs__panel-desc {
    margin: 0;
    padding: 0;
}


.more-than__dashboard {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.more-than__card {
    border-radius: 12px;
    border: 1px solid var(--Brand-Primary-Light, #EFF1FF);
    background: var(--BG-White, #FFF);
    flex: 1;
    max-width: 50%;
    padding: 16px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Card 1: Trailer 150 ---- */
.trailer-card .more-than__card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
}

.more-than__derivative {
    width: 100%;
    height: 1px;
    background: var(--Brand-Primary-Light, #EFF1FF);
}

.more-than__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.more-than__badge.good {
    border-radius: 4px;
    border: 1px solid rgba(0, 156, 91, 0.20);
    background: rgba(0, 156, 91, 0.10);
    padding: 4px 8px;
    color: var(--Status-Success, #009C5B);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%; /* 14px */
}

.more-than__card-header p {
    color: var(--Text-Dark, #0F1C3F);
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%; /* 19.6px */
}

.more-than__stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.more-than__stat-label {
    color: var(--Text-Muted, #5A6478);
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    line-height: 154%; /* 20.02px */
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-icon {
    width: 18px;
    text-align: center;
}

.more-than__stat-value {
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
    line-height: 138%; /* 17.94px */
}

.more-than__stat-value.green {
    color: var(--Status-Success, #009C5B);
}

/* ---- Card 2: Location / map ---- */
.location-card h2 {
    font-size: 17px;
    margin: 0 0 14px 0;
}

.map-wrap {
    border-radius: 12px;
    border: 0.601px solid var(--Brand-Primary-Light, #EFF1FF);
    overflow: hidden;
    height: 150px;
}

.map-wrap img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* ---- Card 3: Alert bar ---- */
.alert-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    /*flex-wrap: wrap;*/
    min-width: 100%;
    padding: 14px;
}

.alert-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.alert-trailer {
    color: var(--Status-Warning, #E89600);
    font-weight: 700;
}

.alert-desc {
    color: var(--Text-Secondary, #8893A8);
}

.alert-right {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.alert-temp {
    color: var(--Text-Dark, #0F1C3F);
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%;
}

.alert-target {
    color: var(--Text-Secondary, #8893A8);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
    white-space: nowrap;
}


.more-than__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.more-than__field-label {
    color: var(--Text-Secondary, #8893A8);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%; /* 18px */
}

/* Temperature range: two inputs with dash + unit */
.temp-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.temp-input {
    display: flex;
    padding: 8px 12px;
    align-items: flex-start;
    flex: 1 0 0;
    border-radius: 6px;
    border: 1px solid var(--Border-Divider, #EEF0F6);
    background: var(--BG-White, #FFF);
}

.temp-input input {
    color: var(--Text-Primary, #202D4E);
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%; /* 19.5px */
    border: none;
    outline: none;
    width: 100%;
    font-family: inherit;
}

.more-than__dash {
    color: var(--Border-Dark, #D7DEE3);
    font-size: 16px;
}

.unit {
    color: var(--Text-Secondary, #8893A8);
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%; /* 19.5px */
}

/* Humidity dropdown */
.select-box {
    display: flex;
    padding: 8px 12px;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    border-radius: 6px;
    border: 1px solid var(--Border-Divider, #EEF0F6);
    background: var(--BG-White, #FFF);
    color: var(--Text-Primary, #202D4E);
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%; /* 19.5px */
    cursor: pointer;
    user-select: none;
}

/* Toggle row */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-row .more-than__field-label {
    color: var(--Text-Dark, #0F1C3F);
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    line-height: 154%; /* 20.02px */
}

.switch {
    position: relative;
    width: 34px;
    height: 20px;
    flex-shrink: 0;
    border: none;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: var(--BG-Subtle-Blue);
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s;
}

.slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform .2s;
}

.switch input:checked + .slider {
    border-radius: 10px;
    background: var(--Brand-Primary, #112AD4);
}

.switch input:checked + .slider::before {
    transform: translateX(13px);
}

/* Save button */
.save-btn {
    display: flex;
    padding: 10px 16px;
    justify-content: center;
    align-items: flex-start;
    align-self: stretch;
    border-radius: 8px;
    border: 1px solid var(--Brand-Primary, #112AD4);
    color: var(--Brand-Primary, #112AD4);
    font-size: 13px;
    font-style: normal;
    font-weight: 700;
    line-height: 138%; /* 17.94px */

    width: 100%;
    background: var(--BG-White);
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.active-alert__title {
    color: var(--Text-Primary, #202D4E);
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.active-alert__label {
    color: var(--Text-Secondary, #8893A8);
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    line-height: 163%; /* 17.93px */
    margin-bottom: 4px;
}

.active-alert__temp-value {
    color: var(--Text-Primary, #202D4E);
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 130%; /* 31.2px */
    letter-spacing: -0.024px;
}

.active-alert__range-value {
    color: var(--Text-Primary, #202D4E);
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%; /* 19.6px */
}


/*table*/

.more-than__table-card {
    min-width: 100%;
}

/* header */
.more-than__card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.more-than__card-top p {
    color: var(--Extended-Dark-Graphite-100, #101727);
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%; /* 19.6px */
}

.filters {
    display: flex;
    gap: 10px;
}

.filters .pill {
    border-radius: 4px;
    background: var(--Brand-Primary-Lighter, #F6F7FF);
    padding: 4px 12px;
    color: var(--Text-Muted, #5A6478);
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    line-height: 145%; /* 15.95px */
    white-space: nowrap;
}

/* table as flex rows */
.more-than__table {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--Brand-Primary-Light, #EFF1FF);
    background: var(--BG-White-100, #FFF);
}

.more-than__row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 7px 12px;
    gap: 12px;
}

.more-than__head-row {
    padding: 8px 12px;
    border-bottom: 1px solid var(--Brand-Primary-Light, #EFF1FF);
    background: var(--Brand-Primary-Lighter, #F6F7FF);
}

.more-than__head-row .more-than__cell {
    color: var(--Text-Primary, #202D4E);
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    line-height: 130%; /* 14.3px */
    text-transform: uppercase;
}

.more-than__body-row {
    font-size: 14px;
}

.more-than__body-row:last-child {
    border-bottom: none;
}

.more-than__cell {
    display: flex;
    align-items: center;
}

/* column widths — shared between header and body rows */
.more-than__col-trailer {
    flex: 0 0 60px;
}

.more-than__col-location {
    flex: 1 1 auto;
    min-width: 0;
}

.more-than__col-temp {
    flex: 0 0 80px;
}

.more-than__col-door {
    flex: 0 0 60px;
}

.more-than__col-status {
    flex: 0 0 70px;
}

.more-than__body-row .more-than__col-trailer {
    color: var(--Text-Primary, #202D4E);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%; /* 14px */
}

.more-than__body-row .more-than__col-location {
    color: var(--Text-Muted, #5A6478);
    font-size: 10px;
    font-style: normal;
    font-weight: 400;
    line-height: 140%; /* 14px */
}

.more-than__body-row .more-than__col-temp {
    color: var(--Text-Primary, #202D4E);
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 140%; /* 14px */
}

.more-than__body-row .more-than__col-door,
.more-than__body-row .more-than__col-status {
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%;
}

.green-text {
    color: var(--Status-Success, #009C5B);
}

.red-text {
    color: var(--Status-Error, #D92D20);

}

.more-than__status-badge {
    display: inline-flex;
    padding: 2px 6px;
    border-radius: 4px;
}

.more-than__status-badge.good {
    background: var(--Status-Success-BG, #E6F3EA);
    color: var(--Status-Success, #009C5B);
}

.more-than__status-badge.alert {
    background: var(--Status-Error-BG, #FEF3F2);
    color: var(--Status-Error, #D92D20);
}

.alert-more-than__card3 {
    min-width: 100%;
    flex-direction: row;
    justify-content: space-between;
}


@media (max-width: 1024px) {
    .more-than__title {
        font-size: 42px;
        font-style: normal;
        font-weight: 700;
        line-height: 116%; /* 48.72px */
        letter-spacing: -0.21px;
    }

    .more-than__subtitle {
        font-size: 20px;
        font-style: normal;
        font-weight: 500;
        line-height: 150%; /* 30px */
    }

    .more-than__head {
        margin-bottom: 46px;
    }

    .feature-tabs {
        flex-direction: column;
        gap: 18px;
    }

    .feature-tabs__list {
        flex-direction: row;
        gap: 12px;
        position: relative;
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        cursor: grab;
        user-select: none;
        padding: 0;
        max-width: initial;
    }

    .feature-tabs__item {
        width: 324px;
        height: auto;
        flex-shrink: 0;
    }

    .more-than .feature-tabs {
        height: auto;
    }

    .feature-tabs__item-label {
        font-size: 14px;
        font-style: normal;
        font-weight: 500;
        line-height: 150%;
    }

    .feature-tabs__item-sublabel {
        font-size: 11px;
        font-style: normal;
        font-weight: 400;
        line-height: 163%;
    }

    .feature-tabs__item-icon svg {
        width: 16px;
        height: 16px;
    }

    .feature-tabs__item-icon {
        width: 32px;
        height: 32px;
    }

    .feature-tabs__item-arrow {
        width: 32px;
        height: 32px;
    }

    .feature-tabs__item-arrow svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 576px) {
    .more-than__head {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    .more-than__title {
        font-size: 28px;
        font-style: normal;
        font-weight: 700;
        line-height: 120%; /* 33.6px */
        letter-spacing: -0.084px;
        text-align: left;
    }

    .more-than__subtitle {
        font-size: 14px;
        font-style: normal;
        font-weight: 500;
        line-height: 150%; /* 30px */
        text-align: left;

    }

    .more-than__head {
        margin-bottom: 24px;
    }

    .feature-tabs {
        flex-direction: column;
        gap: 16px;
    }

    .feature-tabs__list {
        gap: 8px;
    }

    .feature-tabs__item {
        width: 295px;
        gap: 8px;
    }

    .feature-tabs__item-label {
        font-size: 14px;
        font-style: normal;
        font-weight: 500;
        line-height: 150%;
    }

    .feature-tabs__item-sublabel {
        font-size: 10px;
    }

    .feature-tabs__item-icon svg {
        width: 14px;
        height: 14px;
    }

    .feature-tabs__item-icon {
        width: 28px;
        height: 28px;
    }

    .feature-tabs__item-arrow {
        width: 28px;
        height: 28px;
    }

    .feature-tabs__item-arrow svg {
        width: 16px;
        height: 16px;
    }
    .feature-tabs__panels {
        padding: 24px;
        gap: 16px;
    }
    .feature-tabs__panel-title {
        font-size: 24px;
        font-style: normal;
        font-weight: 700;
        line-height: 130%; /* 31.2px */
        letter-spacing: -0.024px;
        margin-bottom: 8px;
    }
    .feature-tabs__panel-desc {
        font-size: 14px;
        font-style: normal;
        font-weight: 500;
        line-height: 155%;
    }
    .more-than__dashboard {
        flex-direction: column;
    }
    .more-than__card {
        flex: 1;
        max-width: 100%;
    }

    .more-than__stat-row * {
        font-size: 12px;
    }

    .alert-left {
        flex-wrap: wrap;

    }
    .alert-desc {
        width: 100%;
        font-size: 11px;
        font-style: normal;
        font-weight: 400;
        line-height: 163%;
    }
    .alert-card {
        align-items: flex-end;
        font-size: 11px;
    }
    .alert-card span {
        font-size: 11px;
    }
    .alert-card .alert-trailer {
        font-size: 12px;
    }

    .more-than__head-row .more-than__cell {
        font-size: 9px;
        font-style: normal;
        font-weight: 700;
        line-height: normal;
        text-transform: none;
    }

    /* column widths — shared between header and body rows */
    .more-than__col-trailer {
        flex: 0 0 35px;
    }

    .more-than__col-location {
        flex: 1 0 72px;
    }

    .more-than__col-temp {
        flex: 0 0 35px;
    }

    .more-than__col-door {
        flex: 0 0 35px;
    }

    .more-than__col-status {
        flex: 0 0 60px;
    }

    .more-than__row {
        gap: 9px
    }

    .more-than__card.active-alert {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px 0;
    }

    .more-than__card.alert-more-than__card {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .active-alert__range-value {
        font-size: 18px;
    }

    .active-alert > *  {
        width: 50%;
    }

    .active-alert__msg {
        width: 100%;
        text-align: center;
    }

    .active-alert__range,
    .active-alert__title {
        text-align: right;
    }

    .alert-target {
        font-size: 11px;
        font-style: normal;
        font-weight: 400;
        line-height: 163%;
    }
}