/* ==========================================================================
   Compatibility Checker Specific Styles
   ========================================================================== */

/* Basis-Layout Schutz & Scroll-Stabilisierung */
html, body {
    height: 100%;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    padding-bottom: 4rem;
    width: 100%;
    position: relative;
}

/* --- Hero Sektion Anpassung (Kompakter Look) --- */
.hero.section {
    padding-bottom: 1.5rem !important;
}

.hero-text p {
    margin-bottom: 1.25rem;
}

/* Tool Shell & Grid Fix */
.tool-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2rem;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    margin-top: -0.5rem !important;
    position: relative;
    z-index: 10;
}

.tool-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 28px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto !important;
}

/* --- Controls & Inputs --- */
.tool-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #f8fafc;
}

.tool-input,
.tool-textarea {
    width: 100% !important;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box !important;
    transition: all 0.25s ease;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.tool-input:focus,
.tool-textarea:focus {
    border-color: rgba(129, 140, 248, 0.45);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.08);
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* --- Progress --- */
.progress-container {
    margin-top: 0.5rem;
    width: 100%;
    height: 20px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar {
    height: 100%;
    width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    transition: width 0.25s ease;
}

.progress-bar.is-finished {
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.28);
}

.progress-text {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* --- Analyse-Layout (Zwei Boxen System) --- */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
}

.status-box,
.a11y-box {
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-box {
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.a11y-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.box-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

/* --- Ergebnis-Container & Scroll-Fix --- */
.result-details {
    margin-top: 1.5rem;
}

.result-details-summary {
    cursor: pointer;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.result-details-summary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.result-box-details {
    margin-top: 1rem;
    max-height: 550px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 15px;
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    width: 100% !important;
    box-sizing: border-box !important;
    overscroll-behavior: contain;
}

.url-entry {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.url-entry:hover {
    border-color: rgba(129, 140, 248, 0.16);
}

.url-text {
    font-family: ui-monospace, monospace;
    word-break: break-all;
    color: #a5b4fc;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* --- Zusammenfassung --- */
.summary-box {
    margin-top: 1.25rem;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.result-title {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #f8fafc;
    font-size: 1.2rem;
    font-weight: 700;
}

.muted-text {
    color: #94a3b8;
}

#errorSummary ul {
    list-style: none;
    padding-left: 0;
}

#errorSummary li {
    margin-bottom: 0.8rem;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 4px solid #818cf8;
    font-size: 0.9rem;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.45rem 0.95rem;
    border: 1px solid rgba(129, 140, 248, 0.35);
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.10);
    color: #c7d2fe;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- Buttons --- */
.copy-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

/* --- Buttons Override passend zum Tool --- */
.btn.btn-primary {
    border: 1px solid #6366f1;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: #ffffff;
}

.btn.btn-primary:hover {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #707cf6, #4f46e5);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.28);
}

.btn.btn-outline {
    border: 1px solid #334155;
    background: rgba(15, 23, 42, 0.35);
    color: #f1f5f9;
}

.btn.btn-outline:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
}

/* --- Status Helferklassen optional --- */
.status-ok {
    color: #34d399;
    font-weight: 700;
}

.status-warning {
    color: #fbbf24;
    font-weight: 700;
}

.status-error {
    color: #f87171;
    font-weight: 700;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tool-card {
        padding: 18px !important;
    }

    .result-box-details {
        max-height: 400px;
    }

    .hero.section {
        padding-top: 2rem !important;
    }
}

/* --- Violette Scrollbar für Compatibility Checker --- */
.result-box-details::-webkit-scrollbar {
    width: 8px;
}

.result-box-details::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.result-box-details::-webkit-scrollbar-thumb {
    background: rgba(129, 140, 248, 0.32);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.result-box-details::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.55);
}

/* Firefox */
.result-box-details {
    scrollbar-width: thin;
    scrollbar-color: rgba(129, 140, 248, 0.32) rgba(255, 255, 255, 0.02);
}