/* ==========================================================================
   Itinerary Clean Sub-Stops Styling
   ========================================================================== */
.amarco-itinerary-substops {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}
.substop-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.substop-item:hover {
    border-color: #c5a059;
    box-shadow: 0 4px 14px rgba(197, 160, 89, 0.12);
}
.substop-marker {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #18181b;
    color: #c5a059;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.substop-content {
    flex: 1;
}
.substop-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.substop-title {
    font-size: 15px;
    font-weight: 600;
    color: #18181b;
    margin: 0;
}
.substop-badges,
.substop-meta-tags {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.substop-badge,
.substop-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1.4;
}
.badge-duration,
.tag-duration {
    background: rgba(197, 160, 89, 0.1);
    color: #c5a059;
    border: 1px solid rgba(197, 160, 89, 0.25);
}
.badge-ticket.status-included,
.tag-ticket.status-included {
    background: rgba(16, 185, 129, 0.09);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-ticket.status-free,
.tag-ticket.status-free {
    background: rgba(59, 130, 246, 0.09);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}
.badge-ticket.status-not_included,
.tag-ticket.status-not_included {
    background: rgba(245, 158, 11, 0.09);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.substop-desc {
    font-size: 13.5px;
    color: #4b5563;
    line-height: 1.6;
    margin: 4px 0 0 0;
}
.substop-desc p {
    margin: 0 0 6px 0;
}
.substop-desc p:last-child {
    margin-bottom: 0;
}
.substop-meta {
    display: inline-block;
    font-size: 11.5px;
    color: #c5a059;
    font-weight: 500;
    background: rgba(197, 160, 89, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

/* RTL Natural Alignments for Sub-Stops */
body.rtl .substop-item {
    direction: rtl;
    text-align: right;
    flex-direction: row;
}
body.rtl .substop-header-row {
    flex-direction: row;
}
body.rtl .substop-badges,
body.rtl .substop-meta-tags {
    flex-direction: row;
}

/* ==========================================================================
   Mobile Optimizations (Viewport <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Day-by-Day Itinerary */
    .amarco-itinerary-wrapper, 
    .tf-itinerary-wrapper {
        padding: 0 !important;
        margin: 0 !important;
    }
    .tf-itinerary-item, 
    .amarco-itinerary-item {
        margin-bottom: 10px !important;
        border: 1px solid #e7e0d3 !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
        background: #fff !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    .tf-itinerary-title, 
    .amarco-itinerary-title,
    .tf-itinerary-header {
        padding: 12px 14px !important;
        font-size: 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin: 0 !important;
    }
    .tf-itinerary-content,
    .amarco-itinerary-content {
        padding: 12px 14px !important;
        font-size: 13.5px !important;
    }
    /* Sub-stops inside itinerary */
    .amarco-itinerary-substops {
        gap: 8px !important;
        margin-top: 8px !important;
    }
    .substop-item {
        padding: 8px 0 !important;
        gap: 6px !important;
        flex-direction: column !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        border-bottom: 1px dashed rgba(197, 160, 89, 0.25) !important;
        border-radius: 0 !important;
    }
    .substop-item:last-child {
        border-bottom: none !important;
    }
    .substop-header-row {
        gap: 6px !important;
    }
    
    /* Breadcrumbs and License kickers */
    .amarco-tour-breadcrumbs {
        white-space: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 4px !important;
        scrollbar-width: none !important;
    }
    .amarco-tour-breadcrumbs::-webkit-scrollbar {
        display: none !important;
    }
    .amarco-tour-breadcrumbs .sep {
        margin: 0 4px !important;
    }
    .amarco-kicker-badge,
    .amarco-tour-kicker {
        display: inline-flex !important;
        flex-wrap: nowrap !important;
        white-space: normal !important;
        font-size: 11px !important;
    }
    .amarco-kicker-dot, .kicker-sep {
        display: none !important; /* Hide extra separator dots */
    }

    /* Sticky Bottom Booking Bar */
    .amarco-mobile-booking-bar,
    .tf-sticky-bottom-booking {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99999 !important;
        background: #fff !important;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.08) !important;
        padding: 10px 14px !important;
    }
    
    /* Ensure bottom bar doesn't hide content */
    body,
    .website-wrapper, 
    .main-page-wrapper, 
    .amarco-luxury-tour-wrapper {
        padding-bottom: 85px !important;
    }
    
    /* Booking Drawer */
    .amarco-booking-drawer {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
}

