:root {
    --tp-blue: #0f3f8d;
    --tp-amber: #e28743;
    --tp-bg: #f8fafc;
    --tp-border: #e2e8f0;
    --tp-text: #334155;
    --tp-text-light: #64748b;
    --tp-white: #ffffff;
    --tp-radius: 8px;
    --tp-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --tp-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Elementor Dynamically Injected Vars Fallbacks */
    --tp-price-bg: #eef2ff;
    --tp-price-text: var(--tp-blue);
    --tp-badge-bg: #ccfbf1;
    --tp-badge-text: #0f766e;
    --tp-matched-border: var(--tp-amber);
    --tp-unmatched-bg: var(--tp-bg);
    --tp-unmatched-text: var(--tp-text-light);
    --tp-btn-bg: var(--tp-amber);
    --tp-btn-hover: #c27032;
    --tp-btn-text: var(--tp-white);
}

.tecson-preisrechner-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--tp-text);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.tecson-preisrechner-wrapper * {
    box-sizing: border-box;
}

/* ==========================================================================
   FULL PAGE WIDGET LAYOUT (.tp-layout-full)
   ========================================================================== */
.tp-layout-full {
    container-type: inline-size;
}

.tp-layout-full .tp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 992px) {
    .tp-layout-full .tp-grid {
        grid-template-columns: minmax(300px, 350px) 1fr;
        gap: 48px;
    }
}

@container (min-width: 768px) {
    .tp-layout-full .tp-grid {
        grid-template-columns: minmax(300px, 350px) 1fr;
        gap: 40px;
    }
}

@container (max-width: 767px) {
    .tp-layout-full .tp-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Left Column (Full Page) */
.tp-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.tp-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--tp-blue);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.tp-price-card {
    background: var(--tp-white);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 20px;
    text-align: center;
}

.tp-price-highlight {
    background: var(--tp-price-bg);
    border: none;
}

.tp-price-label {
    font-size: 14px;
    color: var(--tp-text-light);
    margin-bottom: 8px;
}

.tp-price-value {
    color: var(--tp-price-text);
    margin-bottom: 4px;
}

.tp-price-main {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.tp-price-sub {
    font-size: 16px;
    font-weight: 600;
}

.tp-price-netto {
    font-size: 12px;
    color: var(--tp-text-light);
}

.tp-form {
    background: var(--tp-white);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tp-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tp-group-labels {
    display: flex;
    gap: 16px;
}

.tp-group-labels label {
    flex: 1 1 0;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-text);
}

.tp-group-inputs {
    display: flex;
    align-items: center;
    border: 1px solid var(--tp-border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--tp-white);
    min-width: 0;
}

.tp-group-inputs .tp-input {
    border: none;
    border-radius: 0;
    flex: 1 1 0;
    min-width: 0;
}

.tp-group-inputs .tp-input:focus {
    box-shadow: none;
    background: #f8fafc;
}

.tp-input-divider {
    width: 1px;
    height: 24px;
    background: var(--tp-border);
    flex-shrink: 0;
}

.tp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tp-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-text);
}

.tp-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--tp-border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.tp-input:focus {
    outline: none;
    border-color: var(--tp-blue);
    box-shadow: 0 0 0 3px rgba(15, 63, 141, 0.1);
}

/* Remove native number spinners */
.tp-input[type="number"]::-webkit-inner-spin-button,
.tp-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.tp-input[type="number"] {
    -moz-appearance: textfield;
}

/* Custom Select styling */
.tp-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="none" height="24" stroke="%2364748b" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><polyline points="6 9 12 15 18 9"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.tp-submit-btn {
    background: var(--tp-blue);
    color: var(--tp-white);
    border: none;
    border-radius: 4px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
    width: 100%;
    text-align: center;
}

.tp-submit-btn:hover {
    background: #0b306b;
    box-shadow: var(--tp-shadow);
}

.tp-submit-btn:active {
    transform: scale(0.98);
}

.tp-disclaimer {
    font-size: 11px;
    color: var(--tp-text-light);
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* Right Column (Full Page) */
.tp-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.tp-results-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--tp-text);
    line-height: 1.3;
}

.tp-results-subtitle {
    font-size: 14px;
    color: var(--tp-text-light);
    margin: 0 0 24px 0;
}

.tp-matched-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.tp-initial-state, .tp-message {
    background: var(--tp-bg);
    border: 1px dashed var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 32px 20px;
    text-align: center;
    color: var(--tp-text-light);
    font-size: 14px;
    line-height: 1.5;
    grid-column: 1 / -1;
}

/* ==========================================================================
   SIDEBAR WIDGET LAYOUT (.tp-layout-sidebar)
   ========================================================================== */
.tp-layout-sidebar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    container-type: inline-size;
}

@container (max-width: 220px) {
    .tp-sidebar-heading {
        font-size: 16px;
    }
    .tp-sidebar-price-card {
        padding: 8px 8px;
    }
    .tp-sb-price-num {
        font-size: 17px;
    }
    .tp-sb-price-unit {
        font-size: 10px;
    }
    .tp-sb-price-net {
        font-size: 9px;
    }
    .tp-sidebar-form {
        padding: 10px 8px;
        gap: 8px;
    }
    .tp-sb-field .tp-input {
        padding: 6px 6px;
        font-size: 11px;
    }
    .tp-sb-field label {
        font-size: 10px;
    }
    .tp-sb-submit-btn {
        padding: 9px 8px;
        font-size: 12px;
    }
    .tp-sb-disclaimer {
        font-size: 9px;
    }
}

.tp-sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.tp-sidebar-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--tp-blue);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.tp-sidebar-price-card {
    background: var(--tp-price-bg);
    border-radius: var(--tp-radius);
    padding: 12px 14px;
    text-align: center;
    border: 1px solid rgba(15, 63, 141, 0.08);
}

.tp-sb-price-label {
    font-size: 11px;
    color: var(--tp-text-light);
    display: block;
    margin-bottom: 2px;
}

.tp-sb-price-val {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.tp-sb-price-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--tp-price-text);
    line-height: 1.1;
}

.tp-sb-price-unit {
    font-size: 12px;
    font-weight: 600;
    color: var(--tp-text-light);
    white-space: nowrap;
}

.tp-sb-price-net {
    font-size: 10px;
    color: var(--tp-text-light);
    margin-top: 2px;
    white-space: nowrap;
}

.tp-sidebar-form {
    background: var(--tp-white);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tp-sb-fields-row {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.tp-sb-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.tp-sb-field-plz {
    flex: 1 1 90px;
    min-width: 80px;
}

.tp-sb-field-liters {
    flex: 1 1 100px;
    min-width: 90px;
}

.tp-sb-field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--tp-text);
}

.tp-sb-field .tp-input {
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 4px;
}

.tp-sb-submit-btn {
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.tp-sb-disclaimer {
    font-size: 10px;
    color: var(--tp-text-light);
    text-align: center;
    margin: 0;
    line-height: 1.35;
}

.tp-sidebar-results-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tp-sb-results-header {
    margin-top: 4px;
}

.tp-sb-results-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--tp-text);
    margin: 0 0 2px 0;
}

.tp-sb-results-subtitle {
    font-size: 11px;
    color: var(--tp-text-light);
    margin: 0;
}

.tp-layout-sidebar .tp-matched-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    width: 100%;
}

.tp-layout-sidebar .tp-partner-card {
    width: 100%;
    border-radius: var(--tp-card-radius, 8px);
}

.tp-layout-sidebar .tp-card-content {
    padding: var(--tp-card-padding, 12px);
    gap: 8px;
}

.tp-layout-sidebar .tp-partner-logo {
    max-height: 30px;
    max-width: 100px;
}

.tp-layout-sidebar .tp-partner-name {
    font-size: 14px;
}

.tp-layout-sidebar .tp-status-pill {
    font-size: 10px;
    padding: 2px 6px;
}

.tp-layout-sidebar .tp-partner-tagline {
    font-size: 11px;
}

.tp-layout-sidebar .tp-trust-line {
    font-size: 11px;
}

.tp-layout-sidebar .tp-card-footer {
    padding: 0 var(--tp-card-padding, 12px) var(--tp-card-padding, 12px) var(--tp-card-padding, 12px);
}

.tp-layout-sidebar .tp-partner-cta {
    padding: 8px 12px;
    font-size: 13px;
}

.tp-layout-sidebar .tp-unmatched-section {
    margin-top: 10px;
    padding-top: 10px;
}

.tp-layout-sidebar .tp-unmatched-title {
    font-size: 12px;
    margin-bottom: 8px;
}

.tp-layout-sidebar .tp-unmatched-chip {
    height: 28px;
    padding: 2px 8px;
}

.tp-layout-sidebar .tp-chip-fallback {
    font-size: 11px;
}

.tp-layout-sidebar .tp-message {
    padding: 20px 12px;
    font-size: 12px;
}

/* ==========================================================================
   MATCHED CARD DESIGN (SHARED)
   ========================================================================== */
.tp-partner-card {
    background: var(--tp-white);
    border: 1px solid var(--tp-border);
    border-top: 3px solid var(--tp-matched-border);
    border-radius: var(--tp-card-radius, 8px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--tp-shadow);
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.tp-partner-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--tp-shadow-hover);
}

.tp-card-content {
    padding: var(--tp-card-padding, 16px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tp-card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tp-partner-logo {
    max-width: 140px;
    max-height: 44px;
    object-fit: contain;
}

.tp-partner-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tp-partner-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--tp-blue);
    line-height: 1.2;
}

.tp-partner-tagline {
    font-size: 13px;
    color: var(--tp-text-light);
    margin: 0;
    line-height: 1.4;
}

/* Strictly enforce Title Case / Normal Casing — text-transform: uppercase is prohibited */
.tp-status-pill {
    display: inline-block;
    background: var(--tp-badge-bg);
    color: var(--tp-badge-text);
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.02em;
    padding: 3px 8px;
    border-radius: 12px;
}

.tp-trust-line {
    margin: 0;
    font-size: 13px;
    color: var(--tp-text-light);
    line-height: 1.4;
}

.tp-card-footer {
    padding: 0 var(--tp-card-padding, 16px) var(--tp-card-padding, 16px) var(--tp-card-padding, 16px);
    background: var(--tp-white);
}

.tp-partner-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    background: var(--tp-btn-bg);
    color: var(--tp-btn-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.tp-partner-cta:hover {
    background: var(--tp-btn-hover);
    box-shadow: var(--tp-shadow);
    color: var(--tp-white);
}

.tp-partner-cta:active {
    transform: scale(0.98);
}

/* ==========================================================================
   UNMATCHED CHIPS
   ========================================================================== */
.tp-unmatched-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--tp-border);
}

.tp-unmatched-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--tp-text-light);
    margin: 0 0 12px 0;
}

.tp-unmatched-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tp-unmatched-chip {
    display: inline-flex;
    align-items: center;
    background: var(--tp-unmatched-bg);
    border: 1px solid var(--tp-border);
    border-radius: 20px;
    padding: 4px 10px;
    height: 30px;
    filter: grayscale(100%);
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.tp-unmatched-chip:hover {
    opacity: 1;
}

.tp-chip-img {
    height: 16px;
    max-width: 60px;
    object-fit: contain;
}

.tp-chip-fallback {
    font-size: 12px;
    font-weight: 500;
    color: var(--tp-unmatched-text);
}

/* ==========================================================================
   SKELETON LOADING
   ========================================================================== */
.tp-skeleton {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 576px) {
    .tp-layout-full .tp-skeleton {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tp-skeleton-card {
    height: 130px;
    background: #f1f5f9;
    border-radius: var(--tp-radius);
    position: relative;
    overflow: hidden;
}

.tp-skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.4) 20%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: tpShimmer 1.5s infinite;
}

@keyframes tpShimmer {
    100% {
        transform: translateX(100%);
    }
}
