/* Testplan + Feedback: Pills und Modals. Bleibt im 430px-Korsett. */

.bh-tp-dock,
.bh-tp-overlay {
    position: fixed;
    left: 50%;
    right: auto;
    width: 100%;
    max-width: var(--app-max, 430px);
    transform: translateX(-50%);
    box-sizing: border-box;
}

.bh-tp-dock {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding: 0 12px;
    pointer-events: none;
}

/* Über Push-Leiste / eVE-Info-Bubble schieben */
body:has(.bh-push-bar:not([hidden])) .bh-tp-dock,
body:has(.bh-eve-chip:not([hidden])) .bh-tp-dock {
    bottom: calc(230px + env(safe-area-inset-bottom, 0px));
}

body.login-wall-page .bh-tp-dock {
    top: calc(12px + env(safe-area-inset-top, 0px));
    bottom: auto;
}

.bh-tp-dock button {
    pointer-events: auto;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 16px;
    min-height: 44px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.bh-tp-pill--plan {
    background: #1f1f1f;
}

.bh-tp-pill--feedback {
    background: #e6503e;
}

.bh-tp-overlay {
    display: none;
    top: 0;
    bottom: 0;
    height: 100%;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.55);
    padding: 12px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.bh-tp-overlay.is-open {
    display: flex;
    align-items: stretch;
    justify-content: center;
}

body.bh-tp-lock {
    overflow: hidden;
}

body.bh-tp-lock .bh-tp-dock {
    visibility: hidden;
    pointer-events: none;
}

.bh-tp-panel {
    background: #f7f6f3;
    border-radius: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
    color: #1a1a1a;
}

.bh-tp-head {
    padding: 16px 16px 12px;
    border-bottom: 1px solid #eceae4;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
}

.bh-tp-head h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.bh-tp-head p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
}

.bh-tp-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.bh-tp-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #eceae4;
    padding: 0 8px;
}

.bh-tp-device {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #eceae4;
    font-size: 13px;
}

.bh-tp-device label {
    font-weight: 700;
    color: #555;
}

.bh-tp-device select {
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f7f6f3;
    color: #1a1a1a;
}

.bh-tp-device__hint {
    color: #777;
    font-size: 12px;
    font-weight: 600;
}

.bh-tp-plats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: 0 0 auto;
}

.bh-tp-plat {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eceae4;
    color: #888;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.bh-tp-plat.is-on {
    background: #157347;
    color: #fff;
}

.bh-tp-tabs button {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 6px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #777;
    cursor: pointer;
}

.bh-tp-tabs button.is-active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

.bh-tp-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 12px 24px;
    flex: 1;
}

.bh-tp-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bh-tp-nav__item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 14px 14px 14px 16px;
    text-align: left;
    font: inherit;
    color: #1a1a1a;
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    cursor: pointer;
    min-height: 56px;
}

.bh-tp-nav__item:active {
    background: #f0eeea;
}

.bh-tp-nav__label {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.bh-tp-nav__meta {
    font-size: 12px;
    font-weight: 600;
    color: #777;
    white-space: nowrap;
}

.bh-tp-nav__chev {
    width: 8px;
    height: 8px;
    border-right: 2px solid #aaa;
    border-bottom: 2px solid #aaa;
    transform: rotate(-45deg);
    flex-shrink: 0;
}

.bh-tp-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 8px 4px;
    background: none;
    border: none;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    min-height: 44px;
}

.bh-tp-back span {
    font-size: 18px;
    line-height: 1;
}

.bh-tp-rubrik__title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #1a1a1a;
}

.bh-tp-rubrik__count {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
}

.bh-tp-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.bh-tp-card__retest {
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #fff4cc;
    color: #7a5b00;
    font-size: 12px;
    font-weight: 700;
}

.bh-tp-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.bh-tp-card__top h4 {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.bh-tp-badge {
    flex: 0 0 auto;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eceae4;
    color: #555;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.bh-tp-badge.is-partial {
    background: #e8f5e9;
    color: #157347;
}

.bh-tp-badge.is-done {
    background: #157347;
    color: #fff;
}

.bh-tp-card h4 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.bh-tp-card__top + ol {
    margin-top: 0;
}

.bh-tp-ok:disabled {
    opacity: 0.55;
    cursor: default;
}

.bh-tp-card ol {
    margin: 0 0 10px;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.45;
    color: #333;
}

.bh-tp-card ol a,
.bh-tp-expect a,
.bh-tp-link {
    color: #e25b45;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: normal;
}

.bh-tp-expect {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.bh-tp-expect strong {
    display: block;
    font-size: 12px;
    margin-bottom: 2px;
}

.bh-tp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bh-tp-actions button {
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    min-height: 44px;
    border-radius: 10px;
    cursor: pointer;
    padding: 10px 8px;
}

.bh-tp-ok {
    background: #fff;
    color: #157347;
    border: 2px solid #157347;
}

.bh-tp-ok.is-on {
    background: #157347;
    color: #fff;
}

.bh-tp-fail {
    background: #fff;
    color: #c0392b;
    border: 2px solid #c0392b;
}

.bh-tp-fail.is-on {
    background: #c0392b;
    color: #fff;
}

.bh-tp-comment {
    display: none;
    margin-top: 10px;
}

.bh-tp-comment.is-open {
    display: block;
}

.bh-tp-comment textarea,
.bh-tp-form textarea,
.bh-tp-form input {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
}

.bh-tp-comment textarea {
    min-height: 72px;
    resize: vertical;
}

.bh-tp-empty {
    text-align: center;
    color: #777;
    padding: 32px 12px;
    font-size: 15px;
}

.bh-tp-form label {
    display: block;
    font-weight: 700;
    margin: 12px 0 6px;
    font-size: 14px;
}

.bh-tp-form .bh-tp-optional {
    font-weight: 400;
    color: #888;
}

.bh-tp-url {
    font-size: 12px;
    color: #999;
    margin-top: 12px;
    word-break: break-all;
}

.bh-tp-submit {
    width: 100%;
    margin-top: 16px;
    background: #e6503e;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    min-height: 48px;
}

.bh-tp-submit:disabled {
    background: #ccc;
}

.bh-tp-success {
    display: none;
    text-align: center;
    padding: 48px 20px;
}

.bh-tp-success.is-on {
    display: block;
}

.bh-tp-success h3 {
    margin: 0 0 8px;
}

.bh-tp-success p {
    margin: 0;
    color: #666;
}
