/* ==========================================================================
   Accessibility 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(45, 212, 191, 0.42);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 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, #2dd4bf, #14b8a6);
    color: #042f2e;
    font-size: 0.85rem;
    font-weight: 700;
    transition: width 0.25s ease;
}

.progress-bar.is-finished {
    box-shadow: 0 0 18px rgba(45, 212, 191, 0.18);
}

.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(45, 212, 191, 0.05);
    border: 1px solid rgba(45, 212, 191, 0.15);
}

.a11y-box {
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 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;
}

/* --- Erweiterte Info-Boxen für Empfehlungen --- */
.explanation-box,
.recommendation-box,
.legal-box {
    margin-top: 0.9rem;
    border-radius: 12px;
    padding: 14px;
    font-size: 0.88rem;
    line-height: 1.6;
}

.explanation-box {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

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

.legal-box {
    background: rgba(168, 85, 247, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.15);
}

/* --- 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(45, 212, 191, 0.18);
}

.url-text {
    font-family: ui-monospace, monospace;
    word-break: break-all;
    color: #99f6e4;
    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 #f59e0b;
    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(45, 212, 191, 0.35);
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.10);
    color: #99f6e4;
    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);
}

/* --- Tool-Buttons Override --- */
.btn.btn-primary {
    border: 1px solid #14b8a6;
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
    color: #042f2e;
}

.btn.btn-primary:hover {
    border-color: #0f766e;
    background: linear-gradient(135deg, #20cbb7, #0f9f91);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.25);
}

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

.btn.btn-outline:hover {
    border-color: #2dd4bf;
    background: rgba(45, 212, 191, 0.08);
}

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

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

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

.severity-low {
    color: #93c5fd;
}

.severity-medium {
    color: #fbbf24;
}

.severity-high {
    color: #f87171;
}

/* --- 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;
    }
}

/* --- Türkisfarbene Scrollbar --- */
.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(45, 212, 191, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.result-box-details::-webkit-scrollbar-thumb:hover {
    background: rgba(45, 212, 191, 0.5);
}

/* Firefox */
.result-box-details {
    scrollbar-width: thin;
    scrollbar-color: rgba(45, 212, 191, 0.3) rgba(255, 255, 255, 0.02);
}