/* ==========================================================================
   Website Audit Page Styles
   Orientierung am Link Checker Look & Feel
   ========================================================================== */

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 kompakter --- */
.hero.section {
    padding-bottom: 1.5rem !important;
}

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

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

.audit-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%;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
}

/* --- Titel in Cards --- */
.audit-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.audit-card p {
    line-height: 1.7;
}

/* --- Formular --- */
.audit-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.audit-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: #f8fafc;
}

.audit-input {
    width: 100%;
    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;
    transition: all 0.25s ease;
}

.audit-input:focus {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(255, 255, 255, 0.06);
}

.audit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* --- Button-Stil passend zum Projekt-Look --- */
.audit-button,
.project-link,
.inline-tool-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.25s ease;
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #03100b;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.18);
}

.audit-button:hover,
.project-link:hover,
.inline-tool-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.24);
}

/* --- Einzeltaste neutral --- */
.inline-tool-link {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: none;
    padding: 10px 14px;
    font-size: 0.88rem;
}

.inline-tool-link:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

/* --- Startbox Zusatzinfo --- */
.audit-helper-text {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-top: 0.2rem;
}

/* --- Tool Boxen / Accordion --- */
.audit-tools-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 0.5rem;
}

.audit-tool-box {
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.audit-tool-box:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.audit-tool-box summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 20px;
    font-weight: 700;
    font-size: 1rem;
    color: #f8fafc;
    position: relative;
    transition: background 0.2s ease;
}

.audit-tool-box summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.audit-tool-box summary::-webkit-details-marker {
    display: none;
}

.audit-tool-box summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 17px;
    font-size: 1.15rem;
    font-weight: 700;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.audit-tool-box[open] summary::after {
    content: "–";
}

.audit-tool-content {
    padding: 0 20px 20px 20px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

.audit-tool-content p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* --- Meta-Infos in Boxen --- */
.audit-tool-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.audit-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Ergebnisbox für später --- */
.audit-result-placeholder {
    margin-top: 1rem;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
}

/* --- Hinweisbox --- */
.audit-note-box {
    margin-top: 1.2rem;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.14);
    color: rgba(255, 255, 255, 0.9);
}

/* --- Übersicht --- */
.audit-overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* --- Loading --- */
.audit-loading-card {
    text-align: center;
}

.audit-loading-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    min-height: 240px;
    text-align: center;
}

.audit-spinner {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.10);
    border-top: 4px solid #34d399;
    border-right: 4px solid #10b981;
    animation: auditSpin 0.9s linear infinite;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.12);
}

.audit-loading-url {
    color: #8af0c5;
    font-family: ui-monospace, monospace;
    word-break: break-all;
}

.audit-loading-subtext {
    color: rgba(255, 255, 255, 0.72);
    max-width: 680px;
    line-height: 1.7;
}

.audit-button.is-loading {
    opacity: 0.9;
    cursor: wait;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.audit-button:disabled,
.audit-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(3, 16, 11, 0.22);
    border-top: 2px solid rgba(3, 16, 11, 0.9);
    animation: auditSpin 0.7s linear infinite;
    display: inline-block;
}
.audit-finding-image {
    margin-top: 0.5rem;
    width: 100%;
    max-width: 900px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    display: block;
}

@keyframes auditSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .audit-card {
        padding: 18px !important;
    }

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

    .audit-tool-box summary {
        padding: 16px 18px;
        font-size: 0.96rem;
    }

    .audit-tool-box summary::after {
        right: 18px;
        top: 15px;
    }

    .audit-tool-content {
        padding: 0 18px 18px 18px;
    }

    .audit-actions {
        flex-direction: column;
    }

    .audit-button,
    .project-link,
    .inline-tool-link {
        width: 100%;
    }
}