@layer tm-features {
    .tm-priceagent {
        font-size: var(--tm-font-size-200);
    }

    .tm-priceagent .tm-destination-picker__tree-title {
        margin-block: var(--tm-space-2);
        margin-inline: var(--tm-space-2);
        margin-bottom: 0;
    }

    .tm-priceagent .tm-destination-picker__popular {
        display: none;
    }

    .tm-priceagent .tm-destination-picker__search {
        margin-bottom: 0;
    }

    .tm-priceagent__destination-type {
        float: left;
        display: block;
        width: 50%;
    }

    .tm-priceagent .tm-form__field .tm-form__field {
        padding: 0;
    }

    /* Destination toggler - design change */
    .tm-priceagent .tm-destination-node__toggle::before {
        display: inline-block;
        color: var(--tm-color-brand);
        font-family: "Font Awesome 6 Pro";
        font-weight: 900;
        content: "\f078";
        transition: transform 0.25s ease;
    }

    .tm-priceagent .tm-destination-node__toggle[aria-expanded="true"]::before {
        transform: rotate(180deg);
    }

    /* Move arrow as last element in destination toggler, instead of first */
    .tm-priceagent .tm-destination-node__row {
        flex-direction: row-reverse;
    }

    .tm-priceagent .tm-destination-node__row:hover {
        background-color: var(--tm-color-surface-dark);
    }

    .tm-hidden.tm-priceagent-grid {
        display: none;
    }

    .tm-priceagent-grid {
        display: grid;
        gap: var(--tm-space-4);
        grid-template-columns: 1fr;
        grid-template-areas:
/*            "type"*/
            "airport"
            "destination"
            "date"
            "duration";
    }

    

    .tm-priceagent-grid__type {
        grid-area: type;
    }

    .tm-priceagent-grid__airport {
        grid-area: airport;
    }

    .tm-priceagent-grid__destination {
        grid-area: destination;
    }

    .tm-priceagent-grid__date {
        grid-area: date;
    }

    .tm-priceagent-grid__duration {
        grid-area: duration;
      /*  margin-bottom: var(--tm-space-4);*/
    }

    /*.tm-priceagent-grid__specification {
        grid-area: specification;
    }

    .tm-priceagent-grid__mealtype {
        grid-area: mealtype;
    }

    .tm-priceagent-grid__mealtype {
        grid-area: facility;
    }*/


    @media (max-width: 767px) {
         .tm-priceagent-grid {
            margin-bottom: var(--tm-space-4);
         }
    }

    @media (min-width: 768px) {
        .tm-priceagent-grid {
            grid-template-columns: 1fr 1fr;
            grid-template-areas:
                "airport     destination"
                "date        duration";
        }
    }

    @media (max-width: 900px) {
        .tm-priceagent-form__grid {
            grid-template-columns: 1fr;
        }
    }

    .tm-priceagent-form__more-options {
        margin-bottom: var(--tm-space-3);
    }

    .tm-priceagent-form__more-options .tm-fieldset {
        background: unset;
        padding: var(--tm-space-3);
    }

    .tm-priceagent-form__more-options .tm-fieldset .tm-input,
    .tm-priceagent-form__more-options .tm-fieldset .tm-input[type="text"],
    .tm-priceagent-form__more-options .tm-fieldset .tm-input[type="email"],
    .tm-priceagent-form__more-options .tm-fieldset .tm-input[type="date"],
    .tm-priceagent-form__more-options .tm-fieldset select.tm-input,
    .tm-priceagent-form__more-options .tm-fieldset textarea.tm-input {
        background: #fff;
    }




    .tm-system.flatpickr-calendar {
        font-family: var(--tm-font-face-sans);
        font-size: var(--tm-font-size-200);
        line-height: var(--tm-line-height-base);
    }

    .tm-flatpickr.flatpickr-calendar * {
        box-sizing: border-box;
    }



    /* Flat pickr - custom */
    .tm-system .flatpickr-day.selected {
        background: var(--tm-color-channel-charter);
        border-color: var(--tm-color-channel-charter);
    }

    .tm-system .flatpickr-day.today {
        border: 0;
        color: #000;
        font-weight: var(--tm-font-weight-600);
    }

    .tm-system .flatpickr-weekwrapper span.flatpickr-day,
    .tm-system .flatpickr-weekwrapper span.flatpickr-day:hover {
        color: #000;
        font-weight: var(--tm-font-weight-600);
    }

    .tm-system .flatpickr-current-month .flatpickr-monthDropdown-months {
        color: var(--tm-color-brand-dark);
    }

    .tm-system .flatpickr-current-month input.cur-year {
        color: var(--tm-color-brand-dark);
    }

    .tm-priceagent .tm-input.tm-input--small.flatpickr-input {
        height: 34px;
        min-height: 34px;
        padding-block: var(--tm-space-2);
        line-height: unset;
    }

    .tm-priceagent-form__email {
        height: auto;
        max-height: unset;
        border-radius: var(--tm-radius-2);
        font-size: var(--tm-font-size-300);
        padding-block: var(--tm-space-2);
    }

    .tm-priceagent .tm-dropdown__header {
        margin-top: calc(var(--tm-space-3) * -1);
        padding-top: var(--tm-space-2);
        border-bottom: 1px solid var(--tm-color-border);
        background: var(--tm-color-surface);
    }

    .tm-priceagent .tm-dropdown__option-title {
        margin-top: var(--tm-space-3);
        padding-bottom: var(--tm-space-1);
        color: var(--tm-color-brand-dark);
        font-weight: var(--tm-font-weight-600);
    }

    .tm-priceagent .tm-dropdown__panel {
        max-height: 25rem;
    }

    /* Mobile styling */
    @media (max-width: 768px) {
        .tm-priceagent-form__more-options .tm-fieldset {
            background: unset;
            padding: unset;
        }

        .tm-priceagent .tm-dropdown__panel {
            position: fixed;
            top: 0;
            left: 0;
            width: calc(100% - var(--tm-space-1) - var(--tm-space-1));
            height: calc(100% - var(--tm-space-1) - var(--tm-space-1));
            margin: var(--tm-space-1);
            max-height: 100%;
            border-radius: var(--tm-radius-2);
        }

        .tm-priceagent .tm-dropdown__panel .tm-dropdown__header {
            background: var(--tm-color-surface);
            border-bottom: 1px solid var(--tm-color-border);
        }

        .tm-priceagent .tm-dropdown__panel .tm-dropdown__divider {
            display: none;
        }

        .tm-priceagent .tm-option-card__meta {
            display: none;
        }

        .flatpickr-current-month input.cur-year,
        .flatpickr-current-month .flatpickr-monthDropdown-months {
            font-size: var(--tm-font-size-400);
        }

        .tm-priceagent-form__dates {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    /* =================================================
    Adjustments
    ================================================= */
    #priceAgentDetailText ul {
        margin-top: var(--tm-space-2) !important;
        list-style-type: none !important;
        margin-left: 0px !important;
        padding-left: 0px !important;
    }

    .tm-priceagent__panel {
        width: 100%;
        min-width:800px;
    }

    .tm-priceagent__panel > * {
        z-index: 2;
        position: relative;
    }

    .tm-priceagent__title {
        width: 100%;
        margin-top: var(--tm-space-4);
        margin-bottom: 0;
        text-align: center;
        font-size: var(--tm-font-size-600);
    }

    .tm-modal__text.tm-priceagent__details {
        margin-top: calc(var(--tm-space-4) * -1);
    }

    .tm-priceagent__success-details .tm-priceagent__details-morelink.tm-form__link,
    .tm-priceagent__details .tm-priceagent__details-morelink.tm-form__link {
        font-weight: var(--tm-font-weight-300);
        margin-left: var(--tm-space-1);
    }

    @media (max-width: 768px) {
        .tm-priceagent__panel {
            min-width: unset;
        }

        .tm-priceagent__title {
            font-size: var(--tm-font-size-500);
        }
    }

    @media (min-width: 768px) {
        /* Do not display the br on the title on desktop*/
        .tm-priceagent__title br {
            display: none; 
        }
    }


    .tm-priceagent__intro {
        width: 100%;
    }

    .tm-priceagent__intro {
       /* margin-bottom: calc(var(--tm-space-4) * -1);*/
    }

    .tm-priceagent__icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 65px;
        height: 65px;
        margin: var(--tm-space-4) auto 0;
        border-radius: 50%;
        background-color: var(--tm-color-channel-charter);
    }

    .tm-priceagent__icon svg {
        width: 43px;
        height: 43px;
        fill: #fff;
        color: #fff;
    }

    @media (max-width: 768px) {
        .tm-priceagent__icon {
            width: 45px;
            height: 45px;
        }

        .tm-priceagent__icon svg {
            width: 30px;
            height: 30px;
        }
    }

    .tm-priceagent__details-toggle {
        display: block;
        width: fit-content;
        margin-inline: auto;
    }

    .tm-priceagent__details-toggle::after {
        margin-left: var(--tm-space-1);
        content: "\25BC";
    }

    .tm-priceagent__details-toggle--expanded::after {
        content: "\25B2";
    }

    .tm-priceagent__edit-button {
        display: block;
        width: fit-content;
        margin: unset;
    }

    .tm-priceagent__header {
        border-bottom: 0;
    }

    .tm-form.tm-priceagent-form {
        padding-top: 0;
        padding-bottom: 0;
    }


    .tm-priceagent .tm-button--advanced-edit {
        display:block;
        margin-inline:auto;
    }

    .tm-priceagent .tm-button--advanced-edit.tm-hidden {
        display:none;
    }

    .tm-priceagent .tm-form__actions {
        display: flex;
        flex-direction: column;
        margin-top: var(--tm-space-4);
    }

    .tm-priceagent .tm-form__actions .tm-button--large {
        width: 100%;
        min-height: calc(var(--tm-space-4) + var(--tm-space-4));
        border-radius: var(--tm-radius-2);
        font-size: var(--tm-font-size-400);
        font-weight: var(--tm-font-weight-700);
    }

    .tm-priceagent .tm-form__extra {
        height: auto;
        padding-top: var(--tm-space-4);
        text-align: center;
    }

    .tm-priceagent .tm-form__extra,
    .tm-priceagent .tm-form__extra .tm-form__link {
        font-size: var(--tm-font-size-100);
    }

    .tm-priceagent__details-actions {
        margin-top: 0;
        margin-bottom: var(--tm-space-2);
    }

    .tm-priceagent__details {
        text-align: center;
        font-weight: var(--tm-font-weight-600);
    }

    .tm-priceagent__details-list {
        background-color: var(--tm-color-surface-star);
        border-radius: var(--tm-radius-2);
        border: 1px solid color-mix(
            in srgb,
            var(--tm-color-channel-charter) 30%,
            transparent
        );
        padding-inline: var(--tm-space-4);
        padding-block: 0;
        text-align: left;
        font-weight: var(--tm-font-weight-400);
        font-size: var(--tm-font-size-200);
        line-height: var(--tm-line-height-base);
    }

    .tm-priceagent__details-list.blue {
        background-color: var(--tm-color-surface-muted);
        border: 1px solid color-mix(
            in srgb,
            var(--tm-color-surface-dark) 100%, /*var(--tm-color-channel-charter) 30%,*/
            transparent
        );
    }

    .tm-priceagent__details-list ul {
        margin-bottom: 0;
        padding-left: 0;
        list-style-type: none;
    }

    .tm-priceagent__details-list ul li::before {
     /*   margin-right: var(--tm-space-2);
        color: var(--tm-color-channel-charter);
        font-family: "Font Awesome 6 Pro";
        font-weight: 900;
        content: "\f00c";*/
    }

    .tm-priceagent__details-summary {
        font-weight: var(--tm-font-weight-400);
        font-size: var(--tm-font-size-200);
        line-height: var(--tm-line-height-base);
    }

    .tm-priceagent__close-link {
        font-size: var(--tm-font-size-100);
    }

    .tm-priceagent__close {
        display: block;
        position: absolute !important;
        top: 10px;
        right: 10px;
    }

    /* Success page */
    .tm-priceagent__success-details {
        margin-bottom: var(--tm-space-4);
        padding-inline: var(--tm-space-4);
        border: 1px solid color-mix(
            in srgb,
            var(--tm-color-channel-charter) 30%,
            transparent
        );
        border-radius: var(--tm-radius-2);
        background-color: var(--tm-color-surface-star);
        text-align: left;
        font-weight: var(--tm-font-weight-400);
        font-size: var(--tm-font-size-200);
        line-height: var(--tm-line-height-base);
    }

    .tm-priceagent__success-row {
        grid-template-columns: 25px 150px minmax(0, 1fr);
        padding-block: var(--tm-space-2);
        border-bottom: 1px solid color-mix(
            in srgb,
            var(--tm-color-channel-charter) 20%,
            transparent
        );
    }

    .tm-priceagent__success-row--last {
        border-bottom: 0;
    }

    .tm-priceagent__success-icon {
        fill: color-mix(
            in srgb,
            var(--tm-color-channel-charter) 70%,
            transparent
        );
        color: color-mix(
            in srgb,
            var(--tm-color-channel-charter) 70%,
            transparent
        );
        font-size: var(--tm-font-size-300);
    }

    .tm-priceagent__success-label {
        color: var(--tm-color-brand-dark);
        font-weight: var(--tm-font-weight-600);
    }

    .tm-priceagent__excerpt {
        margin-bottom: var(--tm-space-4);
        font-size: var(--tm-font-size-300);
    }

    @media (max-width: 768px) {
        .tm-priceagent__success-row {
            grid-template-columns: 20px 120px minmax(0, 1fr);
        }
    }

    /* Background image */
    .tm-priceagent__panel::before {
        content: "";
        position: absolute;
        inset: auto 0;
     /*   height: min(19rem, 100%);
        background: url(../gfx/top-image-charter.png) center center / cover no-repeat;*/
        pointer-events: none;
        z-index: 0;
    }

    @media (max-width: 600px) {
        .tm-priceagent__panel::before {
            height: 180px;
            background-position: center top;
            opacity: 0.55;
        }
    }
}

/* Icon styling */
.tm-priceagent__edit-button .fa-angle-right,
.tm-priceagent__edit-button .fa-angle-left,
.tm-button--advanced-edit .fa-chevron-down {  
     color: var(--tm-color-text-brand-dark);
 }

 


 /* Flatpickr Calendar */ 
.tm-flatpickr.flatpickr-calendar {
    line-height: 1.4 !important;

    zoom: 1 !important;
    transform: none !important;
    animation: none !important;

    width: fit-content !important;
    min-width: 349px !important;
    max-width: 349px !important;

    box-sizing: border-box !important;
}

.tm-flatpickr.flatpickr-calendar * {
    box-sizing: border-box !important;
}

.tm-flatpickr .flatpickr-day {
    width: fit-content !important;
    width: fit-content !important;
    height: 39px !important;
    line-height: 39px !important;
}


/* Modal */
#charterPriceAgentV13ModalOverLay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: alpha(opacity=0);
    opacity: 0;
    visibility: hidden;
    z-index: 1100;
}

#priceAgentBoxContainer.tm-priceagent-v13,
#charterPriceAgentV13ModalOverLay.tm-priceagent-v13 {
    visibility: visible !important;
}


/* Spinner / loading */
.tse__resultpage__loading.charter__priceagent__spinner {
    position: relative;
    margin-top: var(--tm-space-6);
}

.tse__resultpage__loading {
    position: relative;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-line-pack: center;
    align-content: center;
    width: 100%;
    margin-bottom: 4.2rem;
    color: var(--tm-color-channel-charter);
    text-align: center;
}

.tse__resultpage__loading__loader {
    -webkit-animation: spin 1.5s linear infinite;
    animation: spin 1.5s linear infinite;
    width: 128px;
    height: 128px;
    position: relative;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0 auto;
    border-width: 5px;
    margin: 0 auto;
    border: 5px solid transparent;
    border-radius: 50%;
    border-top-color: var(--tm-color-channel-charter);
    outline: 0.1rem solid transparent;
}

.tse__resultpage__loading__element {
    border: 5px solid transparent;
    border-radius: 50%;
    outline: 0.1rem solid transparent;
    border-width: 5px;
}

.tse__resultpage__loading--top {
        -webkit-animation: spin 3s linear infinite;
    animation: spin 3s linear infinite;
    position: absolute;
    top: 0.1rem;
    right: 0.1rem;
    bottom: 0.1rem;
    left: 0.1rem;
    border-top-color: inherit;
}

.tse__resultpage__loading--middle {
    -webkit-animation: spin 1.5s linear infinite;
    animation: spin 1.5s linear infinite;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    left: 1.5rem;
    border-top-color: inherit;
}

.tse__resultpage__loading--bottom {
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    bottom: 0.7rem;
    left: 0.7rem;
    border-top-color: inherit;
    border-width: 5px;
}


/* Hotel stars / rating */
.tm-dropdown {
    background-color: #fff;
}
@media (min-width: 768px) {
    #hotelStarsPanel.tm-form__conditional {
        margin-top: 0px;
    }

    #hotelStarsPanel.tm-form__conditional .tm-form__options {
        margin-top:0px;
        gap: var(--tm-space-1);
    }

    #hotelStarsPanel.tm-form__conditional .tm-form__options .tm-option-card {
        padding: var(--tm-space-1);
    }
}


/* Details box - overrules */
#priceAgentDetailsIntro {
    color: var(--tm-color-brand-dark);
}

.tm-priceagent__details-summary {
    color: var(--tm-color-text);
}

/* Details lists highlight */
.tm-priceagent__details-list .tm-text-strong {
    color: var(--tm-color-text-soft);
}

/* Email on mobile */
@media (max-width: 768px) {
    .tm-fieldset.tm-fieldset--full.tm-fieldset--borderless {
        margin-top: var(--tm-space-4);
    }
 }

 .tm-destination-picker {
    overflow:auto;
    max-height:25rem;
 }

 .tm-destination-tree {
    overflow: unset;
    max-height: unset;
 }

@media (max-width: 768px) {
    .tm-dropdown__mobile-header h3 {
        padding-top: var(--tm-space-4);
        padding-bottom: 0px !important;
    }

    /* Hide close X in destination picker on mobile */
    .tm-destination-picker__mobile-header .tm-destination-picker__close {
        display:none;
    }

    .tm-destination-picker .tm-dropdown__mobile-header {
        padding-top: var(--tm-space-2);
    }

    .tm-dropdown__panel.tm-dropdown__panel--tree .tm-destination-picker .tm-destination-picker__mobile-header {
            padding-top: var(--tm-space-2);
            padding-bottom: 0px !important;
            margin: 0px !important;
    }

     .tm-destination-picker {
        max-height:100vh;
     }
}

.tm-destination-picker__selected {
    padding-top: var(--tm-space-1);
    padding-bottom: 0px;
}

/* Should be moved to tm-design-systemr */
@media (min-width: 769px) {
    .tm-dropdown__panel--wide {
        width: calc(100% + 4rem);
    }
}



.tm-dropdown__close {
    cursor: pointer;
    font: inherit;
    padding: var(--tm-space-2);
    position: absolute;
    right: 3px;
    top: 3px;
    color: var(--tm-color-text-brand-dark);
    display: block;
    border: 1px solid var(--tm-color-border-input);
    border-radius: 100%;
    width: 3rem;
    height: 3rem;
    font-size: var(--tm-font-size-body);
    padding: 0px;
    font-weight: var(--tm-font-weight-600);
    line-height: var(--tm-font-size-body);
    z-index: 1000;
}

@media (min-width: 769px) {
    .tm-dropdown__close {
        top: calc(var(--tm-space-2));
        right: var(--tm-space-2);
    }
}


/* TODO: lavet til ny visning af detaljer */
.tm-priceagent__edit-button {
    margin-inline: auto;
}

.tm-priceagent__details-intro {
    display:block;
    text-align:center;
    color: var(--tm-color-text-soft);
    font-weight: var(--tm-font-weight-600);
}

.tm-modal__text.tm-priceagent__details .tm-priceagent__details-list {
    padding-block: var(--tm-space-2);
}


.tm-priceagent__edit-button.tm-hidden {
    display: none;
}



/* Destination picker */
.tm-destination-picker .tm-selected-box {
    display:none;
}
