.b2b-selectable-card {
    position: relative !important;
}

.b2b-select-button {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 12;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #8a1538;
    box-shadow: 0 8px 22px rgba(52, 41, 75, 0.2);
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.b2b-select-button:hover {
    transform: translateY(-1px) scale(1.04);
}

.b2b-select-button.is-selected {
    background: #8a1538;
    color: #fff;
}

.b2b-selection-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 999px;
    background: #34294b;
    color: #fff;
    padding: 12px 16px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    box-shadow: 0 14px 36px rgba(52, 41, 75, 0.28);
    cursor: pointer;
}

.b2b-selection-count {
    display: inline-flex;
    min-width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ebe2ca;
    color: #34294b;
    padding: 0 7px;
    font-size: 0.76rem;
}

.b2b-selection-backdrop {
    position: fixed;
    inset: 0;
    z-index: 88;
    visibility: hidden;
    background: rgba(24, 18, 34, 0.34);
    opacity: 0;
    transition: opacity 200ms ease, visibility 200ms ease;
}

.b2b-selection-backdrop.is-open {
    visibility: visible;
    opacity: 1;
}

.b2b-selection-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    display: flex;
    width: min(430px, 100vw);
    height: 100vh;
    flex-direction: column;
    background: #fff;
    box-shadow: -18px 0 50px rgba(52, 41, 75, 0.22);
    transform: translateX(105%);
    transition: transform 220ms ease;
}

.b2b-selection-panel.is-open {
    transform: translateX(0);
}

.b2b-selection-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background: #4b3f63;
    color: #fff;
    padding: 22px;
}

.b2b-selection-kicker {
    margin: 0 0 5px;
    color: #ebe2ca;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.b2b-selection-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
}

.b2b-icon-button {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    cursor: pointer;
}

.b2b-selection-list {
    flex: 1;
    overflow-y: auto;
    background: #f7f2f6;
    padding: 16px 20px;
}

.b2b-selection-group + .b2b-selection-group {
    margin-top: 20px;
}

.b2b-selection-group-title {
    margin: 0 0 8px;
    color: #8a1538;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.b2b-selection-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 34px;
    gap: 11px;
    align-items: center;
    border: 1px solid #e1d7e2;
    border-radius: 8px;
    background: #fff;
    padding: 9px;
}

.b2b-selection-item + .b2b-selection-item {
    margin-top: 8px;
}

.b2b-selection-item img,
.b2b-selection-placeholder {
    width: 64px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
}

.b2b-selection-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ebe2ca;
    color: #8a1538;
}

.b2b-selection-item strong,
.b2b-selection-item span {
    display: block;
    min-width: 0;
}

.b2b-selection-item strong {
    overflow: hidden;
    color: #34294b;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.b2b-selection-item span {
    margin-top: 4px;
    color: #6c6570;
    font-size: 0.7rem;
    line-height: 1.35;
}

.b2b-remove-item {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8a1538;
    cursor: pointer;
}

.b2b-selection-empty {
    border: 1px dashed #cfc3d0;
    border-radius: 8px;
    background: #fff;
    color: #625c65;
    padding: 22px;
    font-size: 0.86rem;
    line-height: 1.55;
    text-align: center;
}

.b2b-selection-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    border-top: 1px solid #e8e0e9;
    padding: 16px 20px 20px;
}

.b2b-action-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #34294b;
    border-radius: 7px;
    background: #fff;
    color: #34294b;
    padding: 10px 12px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.b2b-action-button.is-primary {
    border-color: #8a1538;
    background: #8a1538;
    color: #fff;
}

.b2b-action-button:disabled {
    border-color: #d8cdd9;
    background: #e9e2ea;
    color: #918a93;
    cursor: not-allowed;
}

.b2b-clear-button {
    grid-column: 1 / -1;
    border: 0;
    background: transparent;
    color: #6c6570;
    padding: 5px;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.b2b-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background: rgba(24, 18, 34, 0.54);
    padding: 20px;
}

.b2b-modal.is-open {
    display: flex;
}

.b2b-modal-card {
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(24, 18, 34, 0.3);
}

.b2b-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #ece5ed;
    padding: 22px 24px 18px;
}

.b2b-modal-header h2 {
    margin: 0;
    color: #34294b;
    font-size: 1.35rem;
    font-weight: 900;
}

.b2b-modal-header p {
    margin: 6px 0 0;
    color: #625c65;
    font-size: 0.84rem;
    line-height: 1.5;
}

.b2b-modal-header .b2b-icon-button {
    background: #f2edf2;
    color: #34294b;
}

.b2b-form {
    padding: 22px 24px 24px;
}

.b2b-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.b2b-form-field {
    display: grid;
    gap: 6px;
}

.b2b-form-field.is-wide {
    grid-column: 1 / -1;
}

.b2b-form-field label {
    color: #34294b;
    font-size: 0.74rem;
    font-weight: 800;
}

.b2b-form-field input,
.b2b-form-field textarea {
    width: 100%;
    border: 1px solid #d8cdd9;
    border-radius: 7px;
    background: #fff;
    color: #34294b;
    padding: 11px 12px;
    font: inherit;
    font-size: 0.86rem;
    outline: none;
}

.b2b-form-field textarea {
    min-height: 110px;
    resize: vertical;
}

.b2b-form-field input:focus,
.b2b-form-field textarea:focus {
    border-color: #8a1538;
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.1);
}

.b2b-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.b2b-form-status {
    display: none;
    margin-top: 14px;
    border-radius: 7px;
    background: #f2edf2;
    color: #34294b;
    padding: 11px 13px;
    font-size: 0.8rem;
    line-height: 1.45;
}

.b2b-form-status.is-visible {
    display: block;
}

.b2b-honeypot {
    position: absolute !important;
    left: -9999px !important;
}

/* Hide previous page-specific shortlist controls when the global system is active. */
body.b2b-selection-ready .trip-selection-launcher,
body.b2b-selection-ready .trip-selection-panel,
body.b2b-selection-ready .selection-notes-modal,
body.b2b-selection-ready #wellness-selection-toggle,
body.b2b-selection-ready #wellness-selection-panel {
    display: none !important;
}

@media (max-width: 640px) {
    .b2b-selection-launcher {
        right: 14px;
        bottom: 14px;
        padding: 11px 13px;
    }

    .b2b-selection-actions,
    .b2b-form-grid {
        grid-template-columns: 1fr;
    }

    .b2b-form-field.is-wide,
    .b2b-clear-button {
        grid-column: auto;
    }

    .b2b-modal {
        align-items: flex-end;
        padding: 0;
    }

    .b2b-modal-card {
        max-height: 92vh;
        border-radius: 8px 8px 0 0;
    }
}
