body.tdq-gplx-chooser-open {
    overflow: hidden;
}

.tdq-gplx-chooser[hidden],
.tdq-gplx-chooser__reopen[hidden] {
    display: none !important;
}

.tdq-gplx-chooser {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 24px;
    font-family: inherit;
}

.tdq-gplx-chooser__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(20, 24, 31, .68);
    cursor: default;
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
}

.tdq-gplx-chooser__dialog {
    position: relative;
    z-index: 1;
    width: min(540px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 34px 36px 30px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 14px;
    background: #fff;
    color: #24272d;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    animation: tdqChooserIn .22s ease-out both;
}

@keyframes tdqChooserIn {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.tdq-gplx-chooser__close {
    position: absolute;
    top: 12px;
    right: 14px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0 0 3px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7b818b;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.tdq-gplx-chooser__close:hover,
.tdq-gplx-chooser__close:focus-visible {
    background: #f1f3f5;
    color: #22262b;
    outline: none;
}

.tdq-gplx-chooser__badge {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 13px;
    background: #fff2e6;
    color: #d98221;
}

.tdq-gplx-chooser__badge svg,
.tdq-gplx-chooser__reopen svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tdq-gplx-chooser__header {
    margin: 0 0 25px;
}

.tdq-gplx-chooser__header h2 {
    margin: 0;
    color: #2b2f35;
    font-size: clamp(27px, 4vw, 34px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.tdq-gplx-chooser__header p {
    margin: 9px 0 0;
    color: #727985;
    font-size: 14px;
    line-height: 1.55;
}

.tdq-gplx-chooser__field + .tdq-gplx-chooser__field {
    margin-top: 22px;
}

.tdq-gplx-chooser__field label {
    display: block;
    margin: 0 0 8px;
    color: #30343a;
    font-size: 17px;
    font-weight: 600;
}

.tdq-gplx-chooser__select-wrap {
    position: relative;
}

.tdq-gplx-chooser__select-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 17px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #30343a;
    border-bottom: 2px solid #30343a;
    transform: translateY(-67%) rotate(45deg);
    pointer-events: none;
}

.tdq-gplx-chooser__select {
    display: block;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 0 48px 0 17px;
    border: 1px solid #bfc5ce;
    border-radius: 6px;
    outline: none;
    background: #fff;
    color: #42474f;
    font: inherit;
    font-size: 16px;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.tdq-gplx-chooser__select:hover:not(:disabled) {
    border-color: #9da5b0;
}

.tdq-gplx-chooser__select:focus {
    border-color: #e38b2c;
    box-shadow: 0 0 0 3px rgba(227, 139, 44, .14);
}

.tdq-gplx-chooser__select:disabled {
    background: #f7f8fa;
    color: #8a9099;
    cursor: not-allowed;
}

.tdq-gplx-chooser__exam-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 13px;
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 8px;
    background: #f7f8fa;
    color: #5e6671;
    font-size: 13px;
}

.tdq-gplx-chooser__exam-meta[hidden] {
    display: none;
}

.tdq-gplx-chooser__exam-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tdq-gplx-chooser__exam-meta span::before {
    content: '•';
    color: #d98221;
}

.tdq-gplx-chooser__select-wrap:has(.tdq-gplx-chooser__select:disabled)::after {
    opacity: .45;
}

.tdq-gplx-chooser__exam-meta strong {
    display: block;
    width: 100%;
    margin-bottom: 2px;
    color: #2d333b;
    font-size: 14px;
}

.tdq-gplx-chooser__exam-meta strong::before {
    content: none;
}


.tdq-gplx-chooser__message {
    min-height: 20px;
    margin: 10px 0 0;
    color: #b42318;
    font-size: 13px;
}

.tdq-gplx-chooser__start {
    display: inline-flex;
    min-height: 55px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 5px;
    padding: 0 24px;
    border: 0;
    border-radius: 6px;
    background: #ff6d61;
    color: #fff;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(255, 109, 97, .2);
    transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}

.tdq-gplx-chooser__start svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tdq-gplx-chooser__start:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(.97);
}

.tdq-gplx-chooser__start:focus-visible {
    outline: 3px solid rgba(255, 109, 97, .28);
    outline-offset: 2px;
}

.tdq-gplx-chooser__start:disabled {
    opacity: .52;
    cursor: not-allowed;
    box-shadow: none;
}

.tdq-gplx-chooser__reopen {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99990;
    display: inline-flex;
    min-height: 49px;
    align-items: center;
    gap: 9px;
    padding: 0 17px;
    border: 0;
    border-radius: 999px;
    background: #d98221;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(84, 45, 8, .24);
}

.tdq-gplx-chooser__reopen svg {
    width: 21px;
    height: 21px;
}

@media (max-width: 600px) {
    .tdq-gplx-chooser {
        align-items: end;
        padding: 0;
    }

    .tdq-gplx-chooser__dialog {
        width: 100%;
        max-height: 92vh;
        padding: 26px 20px calc(22px + env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
    }

    .tdq-gplx-chooser__badge {
        width: 43px;
        height: 43px;
        margin-bottom: 11px;
    }

    .tdq-gplx-chooser__header {
        margin-bottom: 21px;
        padding-right: 26px;
    }

    .tdq-gplx-chooser__header h2 {
        font-size: 27px;
    }

    .tdq-gplx-chooser__field + .tdq-gplx-chooser__field {
        margin-top: 18px;
    }

    .tdq-gplx-chooser__select {
        min-height: 54px;
        font-size: 16px;
    }

    .tdq-gplx-chooser__start {
        width: 100%;
        margin-top: 3px;
    }

    .tdq-gplx-chooser__reopen {
        right: 14px;
        bottom: 14px;
    }
}

/* Multi-license selector */
.tdq-gplx-chooser__field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.tdq-gplx-chooser__field-head label {
    margin: 0;
}

.tdq-gplx-chooser__class-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.tdq-gplx-chooser__class-actions button {
    padding: 5px 9px;
    border: 1px solid #d8dde5;
    border-radius: 7px;
    background: #fff;
    color: #5d6570;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.tdq-gplx-chooser__class-actions button:hover,
.tdq-gplx-chooser__class-actions button:focus-visible {
    border-color: #e38b2c;
    color: #bd6d16;
    outline: none;
}

.tdq-gplx-chooser__classes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    max-height: 210px;
    overflow: auto;
    padding: 2px 3px 3px 1px;
    scrollbar-width: thin;
}

.tdq-gplx-chooser__class-chip {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.tdq-gplx-chooser__class-chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.tdq-gplx-chooser__class-chip span {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 9px 11px;
    border: 1px solid #d5dae2;
    border-radius: 9px;
    background: #fff;
    color: #40464f;
    transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.tdq-gplx-chooser__class-chip strong {
    font-size: 16px;
    line-height: 1;
}

.tdq-gplx-chooser__class-chip small {
    color: #858c96;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.tdq-gplx-chooser__class-chip:hover span {
    border-color: #e7aa68;
    background: #fffaf5;
}

.tdq-gplx-chooser__class-chip input:focus-visible + span {
    outline: 3px solid rgba(227, 139, 44, .18);
    outline-offset: 2px;
}

.tdq-gplx-chooser__class-chip.is-selected span {
    border-color: #e38b2c;
    background: #fff3e6;
    color: #a75a09;
    box-shadow: inset 0 0 0 1px rgba(227, 139, 44, .08);
}

.tdq-gplx-chooser__class-chip.is-selected small {
    color: #bd762c;
}

.tdq-gplx-chooser__dialog {
    width: min(620px, 100%);
}

@media (max-width: 700px) {
    .tdq-gplx-chooser__classes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-height: 190px;
    }
}

@media (max-width: 480px) {
    .tdq-gplx-chooser__field-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .tdq-gplx-chooser__class-actions {
        justify-content: flex-start;
    }

    .tdq-gplx-chooser__classes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tdq-gplx-chooser__class-chip span {
        min-height: 50px;
    }
}
