/* ============================================================
   BeMyTraveler - Booking Modal + Package Builder CSS
   Loaded only on single CPT pages (tour/hotel/car)
   ============================================================ */

/* === Package Builder Header === */
.bmt-pkg-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; margin: 0 0 20px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9e7 50%, #fff 100%);
    border: 1px solid rgba(234, 88, 12,0.15);
    border-radius: 12px;
}
.bmt-pkg-header__info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.bmt-pkg-header__thumb {
    width: 48px; height: 48px; border-radius: 10px; object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); flex-shrink: 0;
}
.bmt-pkg-header__badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--bmt-secondary); background: rgba(234, 88, 12,0.1);
    padding: 2px 8px; border-radius: 4px; margin-bottom: 2px;
}
.bmt-pkg-header__title {
    font-size: 15px; font-weight: 700; margin: 0; line-height: 1.3;
    font-family: var(--bmt-font-heading);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px;
}
.bmt-pkg-header__price { text-align: right; flex-shrink: 0; padding-left: 16px; }
.bmt-pkg-header__price-amount { font-size: 22px; font-weight: 800; color: var(--bmt-primary); display: block; line-height: 1.1; }
.bmt-pkg-header__price-unit { font-size: 12px; color: var(--bmt-text-muted); }
@media (max-width: 480px) {
    .bmt-pkg-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
    .bmt-pkg-header__title { max-width: 180px; font-size: 14px; }
    .bmt-pkg-header__thumb { width: 40px; height: 40px; }
    .bmt-pkg-header__price-amount { font-size: 18px; }
}

/* === Package Builder Form Layout === */
.bmt-package-builder { max-width: 100%; }

/* 2-Column Form Grid */
.bmt-pkg-form .bmt-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.bmt-pkg-form .bmt-form-group {
    margin-bottom: 14px;
}
.bmt-pkg-form .bmt-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--bmt-text);
    margin-bottom: 6px;
}
.bmt-pkg-form .bmt-form-group label i {
    color: var(--bmt-secondary);
    width: 16px;
    margin-right: 4px;
}
.bmt-pkg-form .bmt-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1.5px solid var(--bmt-border);
    border-radius: var(--bmt-radius);
    transition: border-color 0.2s;
}
.bmt-pkg-form .bmt-input:focus {
    border-color: var(--bmt-secondary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12,0.12);
}
@media (max-width: 480px) {
    .bmt-pkg-form .bmt-form-row { grid-template-columns: 1fr; gap: 0; }
}

/* === Progress Steps — Centered dots + labels === */
.bmt-pkg-progress { margin-bottom: 24px; }
.bmt-pkg-progress__bar {
    height: 4px; background: var(--bmt-border); border-radius: 4px;
    overflow: hidden; margin-bottom: 20px;
}
.bmt-pkg-progress__fill {
    height: 100%; background: linear-gradient(90deg, var(--bmt-secondary), #e8c84a);
    border-radius: 4px; transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Steps + labels combined as columns */
.bmt-pkg-progress__steps { display: none; }
.bmt-pkg-progress__labels { display: none; }
.bmt-pkg-stepper {
    display: flex; justify-content: center; gap: 0;
}
.bmt-pkg-stepper__item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
    position: relative;
}
.bmt-pkg-stepper__item::before,
.bmt-pkg-stepper__item::after {
    content: ''; position: absolute; top: 15px; height: 2px; background: var(--bmt-border);
    width: calc(50% - 18px);
}
.bmt-pkg-stepper__item::before { right: calc(50% + 18px); }
.bmt-pkg-stepper__item::after { left: calc(50% + 18px); }
.bmt-pkg-stepper__item:first-child::before { display: none; }
.bmt-pkg-stepper__item:last-child::after { display: none; }
.bmt-pkg-stepper__item.active::before,
.bmt-pkg-stepper__item.completed::before,
.bmt-pkg-stepper__item.completed::after { background: var(--bmt-secondary); }

.bmt-pkg-stepper__dot {
    width: 32px; height: 32px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    background: var(--bmt-white); color: var(--bmt-text-muted);
    border: 2px solid var(--bmt-border); transition: all 0.3s ease;
    outline: none; position: relative; z-index: 1;
}
.bmt-pkg-stepper__item.active .bmt-pkg-stepper__dot {
    background: var(--bmt-secondary); color: #fff;
    border-color: var(--bmt-secondary);
    box-shadow: 0 0 0 4px rgba(234, 88, 12,0.15);
}
.bmt-pkg-stepper__item.completed .bmt-pkg-stepper__dot {
    background: #16a34a; color: #fff; border-color: #16a34a;
}
.bmt-pkg-stepper__label {
    font-size: 11px; color: var(--bmt-text-muted); text-align: center;
    line-height: 1.2; white-space: nowrap;
}
.bmt-pkg-stepper__item.active .bmt-pkg-stepper__label {
    color: var(--bmt-secondary); font-weight: 600;
}

/* jQuery UI Datepicker inside modal — ensure visibility */
.ui-datepicker { z-index: 100001 !important; }
.bmt-modal__content--booking { overflow-y: auto; max-height: 90vh; }

/* === Steps === */
.bmt-pkg-step { display: none; animation: bmtFadeIn 0.3s ease; }
.bmt-pkg-step.active { display: block; }
.bmt-pkg-step__title {
    font-size: 20px; margin: 0 0 4px;
    display: flex; align-items: center; gap: 10px;
    font-family: var(--bmt-font-heading);
}
.bmt-pkg-step__title i { color: var(--bmt-secondary); font-size: 18px; }
.bmt-pkg-optional {
    font-size: 11px; color: var(--bmt-text-muted); font-weight: 400;
    background: var(--bmt-bg); padding: 2px 8px; border-radius: 4px;
}
.bmt-pkg-step__desc { color: var(--bmt-text-muted); font-size: 14px; margin-bottom: 20px; }

/* === Item Summary Card === */
.bmt-pkg-item-summary {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; background: linear-gradient(135deg, #fef9e7, #fff8e1);
    border-radius: 10px; margin-bottom: 20px;
    border: 1px solid rgba(234, 88, 12,0.2);
}
.bmt-pkg-item-summary strong { font-size: 15px; color: var(--bmt-text); }
.bmt-pkg-item-price { font-size: 20px; font-weight: 800; color: var(--bmt-primary); }
.bmt-pkg-item-price small { font-size: 12px; font-weight: 400; color: var(--bmt-text-muted); }

/* === Add-on Loading === */
.bmt-pkg-addon-loading { text-align: center; padding: 40px 0; color: var(--bmt-text-muted); }
.bmt-pkg-addon-loading .bmt-spinner { margin: 0 auto 12px; }
.bmt-pkg-addon-empty { text-align: center; padding: 30px; color: var(--bmt-text-muted); }
.bmt-pkg-addon-empty i { font-size: 24px; margin-bottom: 8px; display: block; }

/* === Add-on Card Grid === */
.bmt-pkg-addon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 700px) { .bmt-pkg-addon-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .bmt-pkg-addon-grid { grid-template-columns: 1fr; } }

.bmt-pkg-addon-card {
    border: 2px solid var(--bmt-border); border-radius: 12px; overflow: hidden;
    cursor: pointer; transition: all 0.3s ease; position: relative; background: var(--bmt-white);
}
.bmt-pkg-addon-card:hover {
    border-color: var(--bmt-secondary);
    box-shadow: 0 4px 16px rgba(234, 88, 12,0.15);
    transform: translateY(-2px);
}
.bmt-pkg-addon-card.selected {
    border-color: var(--bmt-secondary); background: #fef9e7;
    box-shadow: 0 0 0 3px rgba(234, 88, 12,0.15);
}
.bmt-pkg-addon-card.selected::after {
    content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; top: 8px; right: 8px; color: var(--bmt-secondary); font-size: 22px;
    background: #fff; border-radius: 50%; width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.bmt-pkg-addon-card__img { height: 110px; overflow: hidden; }
.bmt-pkg-addon-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.bmt-pkg-addon-card:hover .bmt-pkg-addon-card__img img { transform: scale(1.08); }
.bmt-pkg-addon-card__body { padding: 10px 12px; }
.bmt-pkg-addon-card__title { font-size: 13px; font-weight: 600; margin: 0 0 4px; line-height: 1.3; color: var(--bmt-text); }
.bmt-pkg-addon-card__meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--bmt-text-muted); margin-bottom: 6px; }
.bmt-pkg-addon-card__meta i { font-size: 10px; }
.bmt-pkg-addon-card__price { font-size: 16px; font-weight: 700; color: var(--bmt-primary); }
.bmt-pkg-addon-card__price small { font-size: 11px; font-weight: 400; color: var(--bmt-text-muted); }
.bmt-pkg-addon-card__rating { display: flex; align-items: center; gap: 4px; }
.bmt-pkg-addon-card__rating .stars { color: #f59e0b; font-size: 10px; }
.bmt-pkg-addon-card__rating span { font-size: 11px; color: var(--bmt-text-muted); }

/* === Review Step === */
.bmt-pkg-review { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.bmt-pkg-review-item {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: var(--bmt-bg); border-radius: 10px;
    border: 1px solid var(--bmt-border);
}
.bmt-pkg-review-item__icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    flex-shrink: 0;
}
.bmt-pkg-review-item__icon--tour { background: #dbeafe; color: #2563eb; }
.bmt-pkg-review-item__icon--hotel { background: #fef3c7; color: #d97706; }
.bmt-pkg-review-item__icon--car { background: #d1fae5; color: #059669; }
.bmt-pkg-review-item__info { flex: 1; }
.bmt-pkg-review-item__title { font-weight: 600; font-size: 14px; margin: 0; }
.bmt-pkg-review-item__details { font-size: 12px; color: var(--bmt-text-muted); margin-top: 2px; }
.bmt-pkg-review-item__price { font-weight: 700; font-size: 18px; color: var(--bmt-primary); white-space: nowrap; }
.bmt-pkg-review-item--addon { border-left: 3px solid var(--bmt-secondary); }
.bmt-pkg-review-item--addon .bmt-pkg-review-item__badge {
    font-size: 10px; background: var(--bmt-secondary); color: #1a1a2e; padding: 2px 8px;
    border-radius: 4px; font-weight: 700; text-transform: uppercase; display: inline-block; margin-bottom: 2px;
}

/* === Fee Breakdown === */
.bmt-pkg-fees {
    margin: 16px 0;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1px solid var(--bmt-border);
    border-radius: 10px;
}
.bmt-pkg-fees__table { width: 100%; border-collapse: collapse; }
.bmt-pkg-fees__row td {
    padding: 10px 0;
    font-size: 14px;
    color: var(--bmt-text-light);
    border-bottom: 1px dashed #e2e8f0;
}
.bmt-pkg-fees__row:last-child td { border-bottom: none; }
.bmt-pkg-fees__val {
    text-align: right;
    font-weight: 700;
    color: var(--bmt-text);
    white-space: nowrap;
}

/* === Package Total === */
.bmt-pkg-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px; border-radius: 12px; font-size: 15px;
    background: linear-gradient(135deg, #1a1a2e, #0f172a);
    color: #fff;
}
.bmt-pkg-total strong { font-size: 24px; color: var(--bmt-secondary); }

/* === Navigation === */
.bmt-pkg-nav {
    display: flex; justify-content: flex-end; align-items: center;
    margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--bmt-border);
    gap: 10px;
}
.bmt-pkg-nav .bmt-pkg-prev { margin-right: auto; }
.bmt-pkg-nav__right { display: flex; gap: 10px; }
.bmt-pkg-skip {
    background: transparent; color: var(--bmt-text-muted);
    border: 1px solid var(--bmt-border); padding: 10px 20px;
    border-radius: 8px; font-size: 14px;
}
.bmt-pkg-skip:hover { background: var(--bmt-bg); color: var(--bmt-text); }
.bmt-pkg-next, .bmt-pkg-submit {
    padding: 10px 24px; font-size: 14px; border-radius: 8px;
}
.bmt-pkg-prev {
    padding: 10px 20px; font-size: 14px; border-radius: 8px;
}

/* === Success State === */
.bmt-pkg-success { text-align: center; padding: 48px 24px; }
.bmt-pkg-success__icon { font-size: 56px; color: #16a34a; margin-bottom: 16px; animation: bmtBounceIn 0.5s ease; }
.bmt-pkg-success__title { font-size: 24px; font-weight: 700; margin: 0 0 8px; }
.bmt-pkg-success__ref { font-size: 14px; color: var(--bmt-text-muted); margin-bottom: 16px; }
.bmt-pkg-success__ref strong { color: var(--bmt-secondary); font-size: 18px; }
.bmt-pkg-success__total { font-size: 32px; font-weight: 800; color: var(--bmt-primary); margin-bottom: 24px; }
@keyframes bmtBounceIn { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* === Sidebar Widget Guarantee === */
.bmt-booking-widget__guarantee {
    text-align: center; font-size: 12px; color: var(--bmt-text-muted);
    margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.bmt-booking-widget__guarantee i { color: #16a34a; }
