/* ==========================================================
   LOSTINMANILA CUSTOM TRIP PRESENTATION V2
   ========================================================== */


/* ----------------------------------------------------------
   ROUTE EDITOR
   ---------------------------------------------------------- */

.custom-trip-branding-manager {
    margin: 30px 0;
    padding: 24px;
    border: 1px solid #cfddd3;
    border-radius: 18px;
    background: #f8fbf9;
}

.custom-trip-branding-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.custom-trip-branding-heading > div > span {
    display: block;
    margin-bottom: 5px;
    color: #1d6a43;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.custom-trip-branding-heading h2 {
    margin: 0 0 6px;
}

.custom-trip-branding-heading p {
    margin: 0;
    color: #69766d;
    line-height: 1.5;
}

.custom-trip-master-switch {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    padding: 10px 13px;
    border: 1px solid #c9d8cd;
    border-radius: 999px;
    background: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.custom-trip-master-switch input,
.custom-trip-checkbox input {
    accent-color: #1d6a43;
}

.custom-trip-control-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.custom-trip-control-grid label,
.custom-trip-opacity-control > label {
    font-weight: 800;
}

.custom-trip-control-grid input[type="color"] {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 8px;
    padding: 4px;
    border: 1px solid #cad8ce;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

.custom-trip-opacity-control {
    margin-top: 20px;
}

.custom-trip-opacity-control > div {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) 58px;
    align-items: center;
    gap: 15px;
    margin-top: 9px;
}

.custom-trip-opacity-control input {
    width: 100%;
    accent-color: #1d6a43;
}

.custom-trip-opacity-control strong {
    text-align: right;
}

.custom-trip-opacity-control small,
.custom-trip-save-note {
    display: block;
    margin-top: 6px;
    color: #758078;
    font-size: 12px;
    line-height: 1.45;
}

.custom-trip-image-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.custom-trip-image-grid article {
    padding: 18px;
    border: 1px solid #d5e0d8;
    border-radius: 14px;
    background: #ffffff;
}

.custom-trip-image-grid article strong,
.custom-trip-image-grid article span {
    display: block;
}

.custom-trip-image-grid article span {
    margin-top: 5px;
    min-height: 38px;
    color: #6c786f;
    font-size: 12px;
    line-height: 1.45;
}

.custom-trip-image-grid input[type="file"] {
    display: block;
    width: 100%;
    margin-top: 15px;
}

.custom-trip-image-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.custom-trip-image-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.custom-trip-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    font-weight: 800;
}

.custom-trip-branding-status {
    min-height: 20px;
    margin-top: 14px;
    color: #1d6a43;
    font-size: 12px;
    font-weight: 800;
}

.custom-trip-branding-status.error {
    color: #a52b25;
}


/* ----------------------------------------------------------
   LIVE PREVIEW
   ---------------------------------------------------------- */

.custom-trip-preview {
    position: relative;
    display: grid;
    grid-template-columns:
        44% minmax(0, 56%);
    min-height: 260px;
    overflow: hidden;
    margin-top: 22px;
    border: 1px solid #ccd9cf;
    border-radius: 16px;
    background:
        var(
            --preview-background,
            #f5f7f4
        );
}

.custom-trip-preview-background {
    position: absolute;
    z-index: 0;
    inset: 0 56% 0 0;
    background-position: center;
    background-size: cover;
    opacity:
        var(
            --preview-opacity,
            0.18
        );
}

.custom-trip-preview-info {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.custom-trip-preview-info > span {
    color:
        var(
            --preview-accent,
            #1d6a43
        );
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.custom-trip-preview-info > strong {
    margin-top: 7px;
    color: #17211b;
    font-size: 23px;
}

.custom-trip-preview-info > small {
    margin-top: 8px;
    color: #526158;
    line-height: 1.45;
}

.custom-trip-preview-map {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: 20% 80%;
    background: #dcebe7;
}

.custom-trip-preview-banner {
    background-position: center;
    background-size: cover;
}

.custom-trip-preview-map-body {
    position: relative;
    background:
        linear-gradient(
            135deg,
            #d8eee8,
            #c7e2dc 42%,
            #dfeee5
        );
}

.custom-trip-preview-map-body::before {
    content: "";
    position: absolute;
    top: 15%;
    bottom: 10%;
    left: 50%;
    width: 6px;
    transform:
        translateX(-50%)
        rotate(-8deg);
    border-radius: 999px;
    background:
        var(
            --preview-accent,
            #1d6a43
        );
}

.custom-trip-preview-map-body span {
    position: absolute;
    left: 50%;
    width: 18px;
    height: 18px;
    transform: translateX(-50%);
    border: 3px solid #ffffff;
    border-radius: 50%;
    background:
        var(
            --preview-accent,
            #1d6a43
        );
}

.custom-trip-preview-map-body
span:nth-child(1) {
    top: 16%;
}

.custom-trip-preview-map-body
span:nth-child(2) {
    top: 48%;
}

.custom-trip-preview-map-body
span:nth-child(3) {
    top: 77%;
}


/* ----------------------------------------------------------
   CREATOR IDENTITY — ALL TRIPS
   ---------------------------------------------------------- */

.route-creator-card {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 11px 0 18px;
}

.route-creator-avatar-link {
    flex: 0 0 auto;
    text-decoration: none;
}

.route-creator-avatar-link img,
.route-creator-avatar-fallback {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-radius: 50%;
    background: #e1ece5;
    color: #155c35;
    object-fit: cover;
    font-size: 15px;
    font-weight: 900;
}

.route-creator-card > div {
    min-width: 0;
}

.route-creator-card > div > span,
.route-creator-card > div > small,
.route-creator-card > div > a {
    display: block;
}

.route-creator-card > div > span {
    color: #7a847d;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.route-creator-card > div > a {
    margin-top: 2px;
    color: inherit;
    text-decoration: none;
}

.route-creator-card > div strong {
    color: #174d38;
    font-size: 14px;
}

.route-creator-card > div small {
    margin-top: 2px;
    color: #748077;
    font-size: 11px;
}


/* ----------------------------------------------------------
   PUBLIC CUSTOM PRESENTATION
   ---------------------------------------------------------- */

body.custom-trip-page {
    background:
        var(
            --trip-background-color,
            #f5f7f4
        );
}

body.custom-trip-page::before {
    content: "";
    position: fixed;
    z-index: 0;
    top: 68px;
    bottom: 0;
    left: 0;
    width: 44%;
    background-image:
        var(
            --trip-background-image,
            none
        );
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity:
        var(
            --trip-background-opacity,
            0.18
        );
    pointer-events: none;
}

.custom-trip-presentation {
    position: relative;
    z-index: 1;
}

.custom-trip-presentation
.route-information {
    background: transparent;
}

.custom-trip-presentation
.trip-customize-panel[hidden],

.custom-trip-presentation
.route-engagement-panel[hidden],

.custom-trip-presentation
.route-share-panel[hidden] {
    display: none !important;
}

.custom-trip-presentation
.back-link,

.custom-trip-presentation
.eyebrow,

.custom-trip-presentation
.route-creator-card strong,

.custom-trip-presentation
.waypoint-list span,

.custom-trip-presentation
.recommended-trip-place-type,

.custom-trip-presentation
.recommended-trip-place-body > a,

.custom-trip-presentation
.route-owner-edit-link {
    color:
        var(
            --trip-accent,
            #1d6a43
        ) !important;
}

.custom-trip-presentation
.waypoint-number,

.custom-trip-presentation
#open-google-maps {
    background:
        var(
            --trip-accent,
            #1d6a43
        ) !important;
}

.custom-trip-presentation
.route-badges span {
    color:
        var(
            --trip-accent,
            #1d6a43
        );
}


/* ----------------------------------------------------------
   MAP BANNER — TOP 20%
   ---------------------------------------------------------- */

.route-map-banner {
    position: absolute;
    z-index: 8;
    top: 0;
    right: 0;
    left: 0;
    height: 20%;
    overflow: hidden;
    background: #ffffff;
    border-bottom:
        1px solid
        rgba(0, 0, 0, 0.12);
}

.route-map-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-trip-presentation.has-trip-banner
#route-map {
    top: 20% !important;
    bottom: 0 !important;
    height: 80% !important;
}

.custom-trip-presentation.has-trip-banner
#route-map-error {
    top:
        calc(
            20% + 16px
        );
}


/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */

@media (max-width: 900px) {

    .custom-trip-branding-heading {
        flex-direction: column;
    }

    .custom-trip-control-grid,
    .custom-trip-image-grid {
        grid-template-columns: 1fr;
    }

    .custom-trip-preview {
        grid-template-columns: 1fr;
    }

    .custom-trip-preview-background {
        inset: 0;
    }

    .custom-trip-preview-map {
        min-height: 230px;
    }

    body.custom-trip-page::before {
        top: 68px;
        width: 100%;
    }

    .custom-trip-presentation
    .route-information {
        position: relative;
    }

    .custom-trip-presentation.has-trip-banner
    .route-map-column {
        height: 560px !important;
        min-height: 560px !important;
    }

    .custom-trip-presentation.has-trip-banner
    .route-map-banner {
        height: 150px;
    }

    .custom-trip-presentation.has-trip-banner
    #route-map {
        top: 150px !important;
        bottom: 0 !important;
        height: 410px !important;
        min-height: 410px !important;
    }
}


@media (max-width: 600px) {

    .custom-trip-branding-manager {
        padding: 18px;
    }

    .custom-trip-preview-info {
        padding: 22px;
    }

    .custom-trip-presentation.has-trip-banner
    .route-map-column {
        height: 500px !important;
        min-height: 500px !important;
    }

    .custom-trip-presentation.has-trip-banner
    #route-map {
        top: 140px !important;
        height: 360px !important;
        min-height: 360px !important;
    }

    .custom-trip-presentation.has-trip-banner
    .route-map-banner {
        height: 140px;
    }
}


/* CUSTOM_TRIP_CREATE_UX_V1 */

.route-editor-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.route-editor-topbar .admin-back-link {
    margin-bottom: 0;
}

.route-view-trip-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #bdd1c3;
    border-radius: 9px;
    background: #ffffff;
    color: #17603a;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.route-view-trip-link:hover {
    border-color: #1d6a43;
    background: #f1f7f3;
}

@media (max-width: 620px) {

    .route-editor-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .route-view-trip-link {
        width: 100%;
    }
}

