/*
Theme Name: Global By Bike GP Child
Theme URI: https://globalbybike.com/
Description: GeneratePress child theme for GlobalByBike using WooCommerce Products and Cambodia Bike Tours Woo Tour Fields as the single tour data source.
Author: W3SEO
Version: 2.3.33
Template: generatepress
Text Domain: gbb
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Floating Action Button */
#gemini-toggle-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 999998;
    transition: transform 0.2s;
}
#gemini-toggle-btn:hover {
    transform: scale(1.08);
}

/* Chat Popup Window */
#gemini-chat-container {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 360px;
    max-width: calc(100vw - 40px);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    z-index: 999999;
    border: 1px solid #e2e8f0;
}

.gemini-header {
    background: linear-gradient(135deg, #047857, #10b981);
    color: #ffffff;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#gemini-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

#gemini-messages {
    height: 320px;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8fafc;
}

.msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
}

.user-msg {
    align-self: flex-end;
    background-color: #059669;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.bot-msg {
    align-self: flex-start;
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 2px;
}

.bot-msg.loading { color: #6b7280; font-style: italic; }
.bot-msg.error { color: #dc2626; background: #fef2f2; border-color: #fecaca; }

.gemini-input-area {
    display: flex;
    padding: 10px;
    gap: 8px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

#gemini-input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    font-size: 13.5px;
    outline: none;
}

#gemini-send-btn {
    background: #059669;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
}

/* ======================================================
   Tour Details Navigation Tabs & "BOOK NOW" Alignment
   ====================================================== */

/* Prevent flex container from pushing the last item to the right edge */
.tour-tabs, 
.tour-nav-tabs, 
.nav-tabs,
ul.nav-tabs {
    justify-content: flex-start !important;
}

/* Remove auto-margin and right float from the Book Now tab */
.tour-tab-book-now,
.book-now-tab,
a[href*="#book-now"],
a[href*="#booking"],
.nav-tabs li:last-child {
    margin-left: 0 !important;
    float: left !important;
}

/* ======================================================
   Synchronize Tour Card Layout (Archive vs Home Page)
   ====================================================== */

/* 1. Remove list bullet points */
.archive .tour-grid-item ul,
.archive .tour-card ul,
.archive .tour-meta ul,
.archive .woocommerce ul.products li.product ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.archive .tour-grid-item li,
.archive .tour-card li,
.archive .tour-meta li {
    list-style-type: none !important;
    padding: 2px 0 !important;
    margin: 0 !important;
}

/* 2. Set 2-column info grid matching Home page */
.archive .tour-meta-info,
.archive .tour-details-wrapper,
.archive .tour-info-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px 12px !important;
    padding: 12px 15px !important;
    font-size: 13px !important;
}

/* 3. Hide extra "VIEW DETAILS" button and "PER PERSON" label */
.archive .badge-guaranteed-departure,
.archive .btn-view-details,
.archive a.button.product_type_simple,
.archive .view-details-btn,
.archive .price-label,
.archive .per-person {
    display: none !important;
}

/* 4. Align Price & Duration display cleanly */
.archive .tour-card .price,
.archive .product .price {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 !important;
}

/* 5. Rounded corners for Tour Cards matching Home page */
.archive .tour-card,
.archive .product-inner,
.archive ul.products li.product {
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important;
    border: 1px solid #edf2f7 !important;
}