.tkcl-input,
.tkcl-button,
.tkcl-checkline,
.tkcl-language-switcher,
.tkcl-modal,
.tkcl-toast {
    box-sizing: border-box;
    font-family: inherit;
}

.tkcl-input {
    width: var(--tkcl-field-width, 260px);
    height: var(--tkcl-field-height, 42px);
    font-size: var(--tkcl-field-font-size, 16px);
    color: var(--tkcl-field-text-color, inherit);
    background: transparent;
    border: var(--tkcl-field-border, 0);
    border-radius: var(--tkcl-field-border-radius, 0);
    outline: none;
    padding: 0.45rem 0.7rem;
    line-height: 1.25;
    box-shadow: none;
    transition: background 0.18s ease;
}

.tkcl-input:placeholder-shown:not(:hover):not(:focus) {
    background: var(--tkcl-ghost-bg, transparent);
}

.tkcl-input:hover,
.tkcl-input:focus {
    background: #d1ccc7;
}

.tkcl-input:not(:placeholder-shown) {
    background: transparent;
}

.tkcl-input::placeholder {
    color: var(--tkcl-ghost-color, rgba(235,197,23,0.45));
    opacity: 1;
}

.tkcl-button {
    width: var(--tkcl-button-width, 260px);
    min-height: var(--tkcl-button-height, 44px);
    border: 0;
    cursor: pointer;
    background: var(--tkcl-button-bg, #691515);
    color: var(--tkcl-button-color, #ebc517);
    font-size: var(--tkcl-button-font-size, 16px);
    font-family: inherit;
    padding: 0.65rem 1rem;
    text-align: center;
    line-height: 1.2;
}

.tkcl-button:hover,
.tkcl-button:focus {
    filter: brightness(1.08);
}

.tkcl-checkline {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: var(--tkcl-field-font-size, 16px);
    line-height: 1.25;
}

.tkcl-checkline input[type="checkbox"] {
    margin: 0;
}

.tkcl-password-wrap {
    display: inline-flex;
    align-items: center;
    position: relative;
    width: var(--tkcl-field-width, 260px);
}

.tkcl-password-wrap .tkcl-input {
    width: 100%;
    padding-right: 2.35rem;
}

.tkcl-eye {
    position: absolute;
    right: 0.35rem;
    width: 1.9rem;
    height: 1.9rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1;
    font-size: 1rem;
    opacity: 0.78;
}

.tkcl-eye:hover,
.tkcl-eye:focus {
    opacity: 1;
}

.tkcl-login-form {
    display: grid;
    gap: 0.75rem;
    align-items: start;
}

.tkcl-language-switcher {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.tkcl-lang-active,
.tkcl-lang-option {
    width: 40px;
    height: 30px;
    border: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.tkcl-flag {
    font-size: 24px;
    line-height: 1;
}

.tkcl-lang-options {
    display: none;
    gap: 0.25rem;
}

.tkcl-language-switcher:hover .tkcl-lang-options,
.tkcl-language-switcher:focus-within .tkcl-lang-options,
.tkcl-language-switcher.tkcl-open .tkcl-lang-options {
    display: flex;
}

.tkcl-modal[hidden],
.tkcl-toast[hidden] {
    display: none !important;
}

.tkcl-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tkcl-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

.tkcl-modal-box {
    position: relative;
    z-index: 1;
    width: min(92vw, 480px);
    background: #fff;
    color: #111;
    padding: 2rem;
    box-shadow: 0 18px 60px rgba(0,0,0,0.28);
    display: grid;
    gap: 1rem;
}

.tkcl-modal-close {
    position: absolute;
    top: 0.45rem;
    right: 0.6rem;
    border: 0;
    background: transparent;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.tkcl-modal-text {
    margin: 0 2rem 0.25rem 0;
    font-size: 1rem;
}

.tkcl-modal-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.92rem;
}

.tkcl-message {
    font-size: 0.95rem;
    min-height: 1.2em;
}

.tkcl-message.tkcl-error {
    color: #9b1111;
}

.tkcl-message.tkcl-success {
    color: #176b20;
}

.tkcl-toast {
    position: fixed;
    z-index: 100001;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: min(90vw, 360px);
    background: #fff;
    color: #111;
    box-shadow: 0 18px 60px rgba(0,0,0,0.3);
    padding: 1.25rem 3rem 1.25rem 1.25rem;
    text-align: center;
    font-size: 1.05rem;
}

.tkcl-toast-close {
    position: absolute;
    top: 0.35rem;
    right: 0.5rem;
    border: 0;
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

/* V028: Browser-Autofill darf die transparenten Login-Felder nicht gelb faerben. */
.tkcl-input:-webkit-autofill,
.tkcl-input:-webkit-autofill:hover,
.tkcl-input:-webkit-autofill:focus,
.tkcl-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 999999s ease-in-out 0s !important;
    background-color: transparent !important;
}

.tkcl-input:autofill {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* V028: Flaggen ohne Kachel, Rahmen, Hintergrund oder Schatten. */
.tkcl-lang-active,
.tkcl-lang-option {
    border: 0 !important;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
}

.tkcl-lang-active:hover,
.tkcl-lang-active:focus,
.tkcl-lang-option:hover,
.tkcl-lang-option:focus {
    background: transparent !important;
    box-shadow: none !important;
}

.tkcl-language-switcher {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.2s ease;
}

.tkcl-language-switcher.tkcl-lang-hidden {
    opacity: 0;
    pointer-events: none;
}

.tkcl-terms-line a {
    text-decoration: underline;
}

/* V028: Erzwungener Sicherheitshinweis fuer angemeldete Benutzer. */
.tkcl-safety-modal .tkcl-modal-backdrop {
    cursor: default;
}

.tkcl-safety-title {
    font-weight: 700;
}

.tkcl-safety-text {
    max-height: min(55vh, 520px);
    overflow: auto;
    line-height: 1.45;
}

.tkcl-safety-text p:first-child {
    margin-top: 0;
}

.tkcl-safety-text p:last-child {
    margin-bottom: 0;
}

/* V033: harte Frontend-Absicherung gegen fehlende/ueberschriebene Theme-Styles. */
.tkcl-password-wrap button.tkcl-eye[data-tkcl-eye] {
    all: unset !important;
    box-sizing: border-box !important;
    position: absolute !important;
    right: 0.35rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 1.9rem !important;
    height: 1.9rem !important;
    min-width: 1.9rem !important;
    min-height: 1.9rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: inherit !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    opacity: 0.78 !important;
}

.tkcl-modal[hidden],
.tkcl-toast[hidden] {
    display: none !important;
}

.tkcl-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tkcl-modal-backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.45) !important;
}

.tkcl-modal-box {
    position: relative !important;
    z-index: 1 !important;
    width: min(92vw, 480px) !important;
    background: #fff !important;
    color: #111 !important;
    padding: 2rem !important;
    box-shadow: 0 18px 60px rgba(0,0,0,0.28) !important;
    display: grid !important;
    gap: 1rem !important;
}

.tkcl-modal-close,
.tkcl-toast-close {
    color: #111 !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.tkcl-message:empty {
    display: none;
}

.tkcl-message.tkcl-has-message {
    display: block;
}

/* V074: Sprachumschalter blendet nach 15/10 Sekunden aus; unsichtbare Hover-Zone bleibt aktiv. */
.tkcl-language-switcher {
    position: fixed !important;
    top: 0.75rem !important;
    left: 0.75rem !important;
    z-index: 2147483000 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: transparent !important;
}
.tkcl-language-switcher.tkcl-lang-hidden {
    opacity: 0 !important;
    pointer-events: auto !important;
}
.tkcl-lang-active,
.tkcl-lang-option {
    width: 35px !important;
    height: 25px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.tkcl-flag-img {
    display: block !important;
    width: 35px !important;
    height: 25px !important;
    object-fit: cover !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* V079: Warnhinweis-Buttonleiste */
.tkcl-safety-button-bar {
    position: fixed !important;
    left: 50% !important;
    bottom: 18px !important;
    transform: translateX(-50%) !important;
    z-index: 99990 !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: min(1120px, calc(100vw - 28px)) !important;
    pointer-events: auto !important;
}

.tkcl-safety-open {
    position: relative !important;
    min-height: 58px !important;
    padding: 10px 10px 10px 38px !important;
    border: 1px solid #ff7a24 !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #ff2215 0%, #ce0000 100%) !important;
    color: #ffe84a !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    cursor: pointer !important;
    box-shadow: 0 8px 18px rgba(0,0,0,0.18) !important;
}

.tkcl-safety-open::before {
    content: '⚠' !important;
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 23px !important;
    line-height: 1 !important;
}

.tkcl-safety-open:hover,
.tkcl-safety-open:focus-visible {
    filter: brightness(1.05) !important;
    transform: translateY(-1px) !important;
}

.tkcl-safety-modal .tkcl-modal-box {
    width: min(92vw, 920px) !important;
    max-height: calc(100vh - 40px) !important;
    overflow: auto !important;
}

@media (max-width: 900px) {
    .tkcl-safety-button-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 520px) {
    .tkcl-safety-button-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        bottom: 10px !important;
    }
    .tkcl-safety-open {
        min-height: 52px !important;
        font-size: 12px !important;
    }
}

/* V100: Warnhinweis-Buttonleiste automatisch ausblenden */
.tkcl-safety-button-bar.tkcl-safety-button-bar-hidden {
    display: none !important;
}

/* V101: Sicherheitshinweis-Modal verbindlich ohne Schliess-X, zentriert und mit vollstaendigem Hinweistext. */
.tkcl-safety-modal {
    align-items: center !important;
    justify-content: center !important;
    padding: 18px !important;
}

.tkcl-safety-modal .tkcl-modal-backdrop {
    background: rgba(0,0,0,0.62) !important;
    cursor: default !important;
}

.tkcl-safety-modal .tkcl-modal-box {
    width: min(96vw, 980px) !important;
    max-height: min(92vh, 820px) !important;
    overflow: auto !important;
    padding: clamp(22px, 3vw, 38px) !important;
    border: 2px solid #d60000 !important;
    border-radius: 14px !important;
    box-shadow: 0 22px 70px rgba(0,0,0,0.42) !important;
    gap: 1.25rem !important;
}

.tkcl-safety-modal .tkcl-modal-close,
.tkcl-safety-modal .tkcl-safety-close {
    display: none !important;
}

.tkcl-safety-title {
    margin: 0 !important;
    color: #c40000 !important;
    font-size: clamp(22px, 2.2vw, 30px) !important;
    font-weight: 700 !important;
    line-height: 1.22 !important;
}

.tkcl-safety-text {
    max-height: none !important;
    overflow: visible !important;
    color: #111 !important;
    font-size: clamp(16px, 1.4vw, 20px) !important;
    line-height: 1.48 !important;
}

.tkcl-safety-text p {
    margin: 0 0 0.78em 0 !important;
}

.tkcl-safety-text p:last-child {
    margin-bottom: 0 !important;
}

.tkcl-safety-accept.tkcl-button {
    width: 100% !important;
    max-width: 520px !important;
    justify-self: center !important;
    margin-top: 0.3rem !important;
    background: #24AC18 !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-size: clamp(17px, 1.6vw, 22px) !important;
    font-weight: 700 !important;
    min-height: 56px !important;
}

.tkcl-safety-open {
    font-size: 12px !important;
    line-height: 1.18 !important;
}

@media (max-width: 720px) {
    .tkcl-safety-modal {
        padding: 10px !important;
    }
    .tkcl-safety-modal .tkcl-modal-box {
        max-height: 92vh !important;
    }
}

/* V107: Passwort-Reset Modal zeigt nach Erfolg nur die grüne Erfolgsmeldung. */
.tkcl-modal[data-tkcl-modal="lost"]:has(.tkcl-message.tkcl-success) .tkcl-modal-text,
.tkcl-modal[data-tkcl-modal="lost"]:has(.tkcl-message.tkcl-success) .tkcl-lost-login,
.tkcl-modal[data-tkcl-modal="lost"]:has(.tkcl-message.tkcl-success) .tkcl-lost-submit {
    display: none !important;
}

/* V109: Gast-Warnhinweis kann per OK geschlossen werden. */
.tkcl-safety-ok.tkcl-button {
    width: 100% !important;
    max-width: 320px !important;
    justify-self: center !important;
    margin-top: 0.3rem !important;
    background: #111111 !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-size: clamp(17px, 1.6vw, 22px) !important;
    font-weight: 700 !important;
    min-height: 52px !important;
}

/* TKCL V113: automatische Stabilisierung fuer Patronenkarten und Legacy-Rxx/Lxx-Bloecke */
[id^="R"][id$="div01"] th,
[id^="R"][id$="div01"] td,
[id^="R"][id$="div2"] th,
[id^="R"][id$="div2"] td,
[id^="L"][id$="div01"] th,
[id^="L"][id$="div01"] td,
[id^="L"][id$="div2"] th,
[id^="L"][id$="div2"] td {
    white-space: nowrap;
}

[id^="R"][id$="div01"] td[class$="tdl"],
[id^="L"][id$="div01"] td[class$="tdl"] {
    font-size: 85%;
}

[id^="R"][id$="div01"] td[class$="tdr"],
[id^="L"][id$="div01"] td[class$="tdr"] {
    white-space: nowrap;
}

.compare .card .aa-cell,
.compare .card .v0-head,
.compare .card .v0-val,
.compare .card .dev-head,
.compare .card .dev-val,
.compare .card .shot-head,
.compare .card .shot-cell,
.card-templates .card .aa-cell,
.card-templates .card .v0-head,
.card-templates .card .v0-val,
.card-templates .card .dev-head,
.card-templates .card .dev-val,
.card-templates .card .shot-head,
.card-templates .card .shot-cell {
    white-space: nowrap;
}

.compare .card .aa-label,
.card-templates .card .aa-label {
    font-size: 85%;
}

.compare .card .block-title,
.card-templates .card .block-title {
    white-space: nowrap;
}

.compare .card .block-title-info,
.card-templates .card .block-title-info {
    font-size: 85%;
}

/* Alternative Logout-Ausgabe: transparent und rechtsbuendig. */
.tkcl-button.tkcl-logout-submit-right {
    background: transparent !important;
    color: #c0c0c0 !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    text-align: right;
    font-size: var(--tkcl-button-font-size, 16px);
}

.tkcl-button.tkcl-logout-submit-right:hover,
.tkcl-button.tkcl-logout-submit-right:focus {
    background: transparent !important;
    color: #fc0303 !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
}

