/* Shared B2C travel calendar — desktop popup + mobile fullscreen */

.b2c-travel-calendar-modal {
    display: none;
    position: absolute;
    top: 70px;
    left: 20px;
    z-index: 10050;
}

    .b2c-travel-calendar-modal.active {
        display: block;
    }

    .b2c-travel-calendar-modal .b2c-tc-container {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        width: 320px;
        max-width: calc(100vw - 24px);
        padding: 16px;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    }

    .b2c-travel-calendar-modal .b2c-tc-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }

    .b2c-travel-calendar-modal .b2c-tc-close {
        background: none;
        border: none;
        font-size: 20px;
        cursor: pointer;
        color: #666;
        line-height: 1;
        padding: 0 4px;
    }

    .b2c-travel-calendar-modal .b2c-tc-title {
        font-weight: 600;
        font-size: 16px;
    }

    .b2c-travel-calendar-modal .b2c-tc-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }

        .b2c-travel-calendar-modal .b2c-tc-nav > .b2c-tc-prev,
        .b2c-travel-calendar-modal .b2c-tc-nav > .b2c-tc-next {
            background: none;
            border: none;
            font-size: 16px;
            cursor: pointer;
            padding: 4px 8px;
        }

        .b2c-travel-calendar-modal .b2c-tc-nav > .b2c-tc-month-label {
            font-weight: bold;
            font-size: 14px;
        }

    /* DOB / past-range: clickable month + year in header (travel calendars unchanged). */
    .b2c-travel-calendar-modal.b2c-tc-past-range .b2c-tc-month-label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: bold;
        font-size: 14px;
    }

    .b2c-travel-calendar-modal .b2c-tc-pick-month,
    .b2c-travel-calendar-modal .b2c-tc-pick-year {
        background: none;
        border: none;
        padding: 2px 4px;
        margin: 0;
        font: inherit;
        font-weight: bold;
        font-size: 14px;
        color: #333;
        cursor: pointer;
        border-radius: 4px;
        line-height: 1.2;
    }

        .b2c-travel-calendar-modal .b2c-tc-pick-month:hover,
        .b2c-travel-calendar-modal .b2c-tc-pick-year:hover {
            color: var(--tx-primary);
            background-color: #eef5ff;
        }

    .b2c-travel-calendar-modal .b2c-tc-picker-heading {
        font-weight: bold;
        font-size: 14px;
    }

    .b2c-travel-calendar-modal .b2c-tc-year-grid,
    .b2c-travel-calendar-modal .b2c-tc-month-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 4px 0 8px;
    }

    .b2c-travel-calendar-modal .b2c-tc-year-option,
    .b2c-travel-calendar-modal .b2c-tc-month-option {
        height: 36px;
        line-height: 36px;
        font-size: 13px;
        border-radius: 6px;
        cursor: pointer;
        color: #333;
        border: none;
        background: transparent;
        padding: 0;
    }

        .b2c-travel-calendar-modal .b2c-tc-year-option:hover,
        .b2c-travel-calendar-modal .b2c-tc-month-option:hover {
            background-color: #eef5ff;
        }

        .b2c-travel-calendar-modal .b2c-tc-year-option.selected,
        .b2c-travel-calendar-modal .b2c-tc-month-option.selected {
            background-color: var(--tx-primary);
            color: #fff;
            font-weight: bold;
        }

        .b2c-travel-calendar-modal .b2c-tc-month-option.disabled {
            color: #ccc;
            cursor: not-allowed;
        }

    .b2c-travel-calendar-modal .b2c-tc-weekdays {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        text-align: center;
        font-size: 12px;
        color: var(--tx-primary);
        font-weight: 600;
        margin-bottom: 8px;
    }

    .b2c-travel-calendar-modal .b2c-tc-body {
        min-height: 0;
    }

    .b2c-travel-calendar-modal .b2c-tc-month {
        margin-bottom: 12px;
    }

    .b2c-travel-calendar-modal .b2c-tc-month-title {
        text-align: center;
        font-weight: bold;
        font-size: 14px;
        margin: 12px 0;
    }

    .b2c-travel-calendar-modal .b2c-tc-days {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        text-align: center;
        row-gap: 8px;
    }

    .b2c-travel-calendar-modal .b2c-tc-day {
        height: 32px;
        line-height: 32px;
        font-size: 13px;
        border-radius: 6px;
        cursor: pointer;
        color: #333;
        border: none;
        background: transparent;
        padding: 0;
    }

        .b2c-travel-calendar-modal .b2c-tc-day.disabled {
            color: #ccc;
            cursor: not-allowed;
        }

        .b2c-travel-calendar-modal .b2c-tc-day.selected {
            background-color: var(--tx-primary);
            color: #fff;
            font-weight: bold;
        }

        .b2c-travel-calendar-modal .b2c-tc-day:not(.disabled):hover {
            background-color: #eef5ff;
        }

/* --- OLD (Done footer) — kept for reference; do not delete ---
.b2c-travel-calendar-modal .b2c-tc-footer {
  margin-top: 10px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.b2c-travel-calendar-modal .b2c-tc-footer small {
  display: block;
  font-size: 10px;
  color: #888;
  margin-bottom: 4px;
}

.b2c-travel-calendar-modal .b2c-tc-footer p {
  margin: 0 0 10px 0;
  font-size: 14px;
}

.b2c-travel-calendar-modal .b2c-tc-done {
  width: 100%;
  padding: 6px;
  background-color: var(--tx-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}
--- END OLD --- */

@media (max-width: 768px) {
    /*.b2c-travel-calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10050;
  }*/

    .b2c-travel-calendar-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 10050;
        background-color: rgba(0, 0, 0, 0.45);
    }

        /*.b2c-travel-calendar-modal .b2c-tc-container {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    padding: 16px;
  }*/

        .b2c-travel-calendar-modal .b2c-tc-container {
            width: 100%;
            height: 66%;
            position: absolute;
            bottom: 0px;
            max-width: none;
            border-radius: 0;
            padding: 16px;
            animation-duration: .4s;
            animation-name: slideInUp;
        }

        .b2c-travel-calendar-modal .b2c-tc-nav {
            display: none;
        }

        /* Past-range/DOB: keep month navigation usable inside the same mobile sheet. */
        .b2c-travel-calendar-modal.b2c-tc-past-range .b2c-tc-nav {
            display: flex;
        }

        .b2c-travel-calendar-modal .b2c-tc-body {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
}

body.b2c-tc-open {
    overflow: hidden;
}
