.tf-bundle-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(17, 17, 17, .5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.tf-bundle-modal[hidden] {
    display: none;
}

.tf-bundle-modal__panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .35);
    outline: none;
    animation: tf-bundle-in .25s ease;
}

@keyframes tf-bundle-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }
}

.tf-bundle-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #eee;
}

.tf-bundle-modal__title {
    margin: 0;
    font-size: 18px;
}

.tf-bundle-modal__sub {
    margin: 4px 0 0;
    color: #6b6b6b;
    font-size: 13px;
}

.tf-bundle-modal__close {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    background: #fff;
    color: #111;
    cursor: pointer;
}

.tf-bundle-modal__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.tf-bundle-opt {
    padding: 16px;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    transition: border-color .2s ease;
}

.tf-bundle-opt.is-invalid {
    border-color: #dc2626;
}

.tf-bundle-opt.is-ready {
    border-color: #16a34a;
}

.tf-bundle-opt__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.tf-bundle-opt__head img {
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: 8px;
    object-fit: cover;
}

.tf-bundle-opt__name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tf-bundle-opt__name b {
    font-size: 15px;
    font-weight: 500;
}

.tf-bundle-opt__name span {
    color: #8a8a8a;
    font-size: 12.5px;
}

.tf-bundle-opt.is-ready .tf-bundle-opt__name span {
    color: #16a34a;
}

.tf-bundle-opt__attr {
    margin-bottom: 12px;
}

.tf-bundle-opt__label {
    display: block;
    margin: 0 0 8px;
    color: #111;
    font-size: 13px;
    font-weight: 500;
}

.tf-bundle-opt__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tf-bundle-pill {
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.tf-bundle-pill:hover {
    border-color: #111;
}

.tf-bundle-pill.is-active {
    border-color: #111;
    background: #111;
    color: #fff;
}

.tf-bundle-pill.is-unavailable {
    color: #b5b5b5;
    text-decoration: line-through;
}

.tf-bundle-opt__form {
    margin: 4px 0 0;
}

.tf-bundle-opt__error {
    margin: 10px 0 0;
    color: #dc2626;
    font-size: 13px;
}

.tf-bundle-modal__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 18px;
    border-top: 1px solid #eee;
}

.tf-bundle-modal__cancel {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 14px;
    cursor: pointer;
}

.tf-bundle-modal__confirm {
    width: auto;
    min-height: 44px;
}

.tf-bundle-msg {
    margin: 12px 0 0;
    color: #dc2626;
    font-size: 13px;
    text-align: center;
}

.tf-bundle-msg.is-ok {
    color: #16a34a;
}

html.tf-bundle-lock,
html.tf-bundle-lock body {
    overflow: hidden;
}

@media (max-width: 575px) {
    .tf-bundle-modal {
        align-items: flex-end;
        padding: 0;
    }

    .tf-bundle-modal__panel {
        max-width: none;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }

    .tf-bundle-modal__foot {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .tf-bundle-modal__confirm,
    .tf-bundle-modal__cancel {
        width: 100%;
    }
}
