/* ===========================================================
   TheCodeAtlas – A11y Form Checker (CSS)
=========================================================== */

/* Toggle Button */
#tca-fc-toggle {
    position: fixed;
    right: 18px;
    bottom: 90px;
    z-index: 999990;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: #0f766e;
    color: #ecfeff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, sans-serif;
    transition: transform .15s ease, box-shadow .15s ease;
}

#tca-fc-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.85);
}

/* Panel */
#tca-fc-panel {
    position: fixed;
    right: 18px;
    bottom: 150px;
    z-index: 999989;
    width: 340px;
    max-width: calc(100% - 30px);
    background: #020617;
    color: #e5e7eb;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, .6);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.9);
    font-family: system-ui, sans-serif;
    font-size: 13px;
    padding: 12px 14px 10px;
    display: none;
}

#tca-fc-panel.tca-fc-open {
    display: block;
}

/* Header */
.tca-fc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.tca-fc-header strong {
    font-size: 14px;
}

.tca-fc-sub {
    font-size: 11px;
    color: #9ca3af;
}

#tca-fc-close {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
}

#tca-fc-close:hover {
    color: #f9fafb;
}

/* Summary */
.tca-fc-summary {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
}

#tca-fc-scan {
    flex: 1;
    border-radius: 999px;
    border: 1px solid #0f766e;
    background: #0f766e;
    color: #ecfeff;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

#tca-fc-scan:hover {
    background: #115e59;
    border-color: #0f766e;
}

.tca-fc-score-wrap {
    width: 120px;
    border-radius: 12px;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, .7);
    padding: 6px 8px;
    text-align: center;
}

.tca-fc-score-label {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 2px;
}

.tca-fc-score {
    font-size: 20px;
    font-weight: 700;
}

.tca-fc-score-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

/* Issues List */
.tca-fc-issues-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
    color: #9ca3af;
}

.tca-fc-issues {
    border-top: 1px solid rgba(148, 163, 184, .6);
    padding-top: 6px;
    max-height: 260px;
    overflow: auto;
}

.tca-fc-issues-list {
    max-height: 230px;
    overflow-y: auto;
}

.tca-fc-empty {
    font-size: 12px;
    color: #9ca3af;
    padding: 6px 2px;
}

/* Issue Row */
.tca-fc-issue-row {
    display: block;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, .4);
    padding: 6px 8px;
    margin-bottom: 4px;
    cursor: pointer;
    background: #020617;
    transition: background .15s ease, border-color .15s ease, transform .08s ease;
}

.tca-fc-issue-row:hover {
    background: #111827;
    border-color: rgba(148, 163, 184, .8);
    transform: translateY(-1px);
}

.tca-fc-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    margin-bottom: 3px;
}

.tca-fc-badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.tca-fc-badge-warn {
    background: #fef3c7;
    color: #92400e;
}

.tca-fc-badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.tca-fc-issue-text {
    font-size: 12px;
    margin-bottom: 2px;
}

.tca-fc-issue-detail {
    font-size: 11px;
    color: #9ca3af;
}

/* Footer / Branding */
.tca-fc-footer {
    border-top: 1px solid rgba(148, 163, 184, .6);
    margin-top: 8px;
    padding-top: 6px;
    text-align: center;
    font-size: 11px;
}

.tca-fc-footer a {
    color: #60a5fa;
    text-decoration: none;
}

.tca-fc-footer a:hover {
    text-decoration: underline;
}

/* Highlighting im Dokument */
.tca-fc-error {
    outline: 2px solid #f97373 !important;
    outline-offset: 2px !important;
}

.tca-fc-warn {
    outline: 2px dashed #fbbf24 !important;
    outline-offset: 2px !important;
}

/* Flash-Effekt beim Anspringen */
@keyframes tca-fc-flash {
    0%   { box-shadow: 0 0 0 0 rgba(96, 165, 250, .0); }
    50%  { box-shadow: 0 0 0 4px rgba(96, 165, 250, .7); }
    100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, .0); }
}

.tca-fc-flash {
    animation: tca-fc-flash 1.0s ease-out;
}

/* Mobile */
@media (max-width: 576px) {
    #tca-fc-toggle {
        right: 12px;
        bottom: 80px;
    }
    #tca-fc-panel {
        right: 8px;
        bottom: 130px;
        width: calc(100% - 16px);
    }
}
