/* Datei: css/cms-checker.css
  CSS-Stile für das CMS-Checker-Plugin.
  Primärfarbe: #a6d30f
  Dunklere Akzentfarbe: #8fb60d
*/
.cms-checker-container {
    max-width: 700px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: #333;
    padding: 1rem;
    overflow-x: hidden; /* Verhindert horizontales Scrollen bei Animationen */
}

#cms-check-form {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    margin-bottom: 2rem;
    position: relative; /* Für potenzielle Overlays oder absolute Positionierung von Ladeelementen */
}

#cms-check-form:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.url-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

#url_to_check {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    padding-left: 3rem;
    box-sizing: border-box;
}

/* Stil für das Eingabefeld, wenn das Formular lädt (optional, JS müsste Klasse hinzufügen) */
#cms-check-form.form-loading #url_to_check {
    background-color: #f0f0f0; /* Leicht ausgrauen */
    /* cursor: not-allowed; // Nicht unbedingt nötig, da Button blockiert */
}


.url-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8fb60d;
    font-size: 1.2rem;
    pointer-events: none;
}

#url_to_check:focus {
    outline: none;
    border-color: #a6d30f;
    box-shadow: 0 0 0 2px rgba(166, 211, 15, 0.3);
}

#cms-check-form input[type="submit"] {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: #a6d30f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, opacity 0.2s ease-in-out;
    text-transform: none;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative; /* Für Pseudo-Elemente oder interne Spinner */
    overflow: hidden; /* Verhindert, dass animierte Pseudo-Elemente überlaufen */
}

#cms-check-form input[type="submit"]:hover:not(:disabled) {
    background: #8fb60d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
#cms-check-form input[type="submit"]:focus:not(:disabled) {
    box-shadow: 0 0 0 3px rgba(166, 211, 15, 0.4), 0 2px 5px rgba(0,0,0,0.1);
}

/* Verbesserter Ladezustand für den Button */
#cms-check-form input[type="submit"]:disabled {
    background: #a6d30f; /* Behält die Hauptfarbe bei */
    color: rgba(255, 255, 255, 0.85); /* Text leicht transparent, um Aktivität anzuzeigen */
    opacity: 0.85; /* Leicht transparent, um Inaktivität für Klicks, aber Aktivität des Prozesses zu zeigen */
    cursor: wait; /* Eindeutiger Warte-Cursor */
    transform: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Reduzierter Schatten im Ladezustand */
    animation: pulseButton 1.8s infinite ease-in-out; /* Pulsierende Animation */
}

/* Ergebnisse-Bereich */
.cms-check-results-area {
    margin-top: 2rem;
}

.cms-check-results-area .cms-result-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardFadeInUp 0.6s 0.1s ease-out forwards;
}

/* Verbesserte Lade-Spinner Optik */
.loading-spinner-wrapper {
    display: none;
    text-align: center;
    padding: 2rem 1rem; /* Weniger vertikales Padding, wenn der Button schon "aktiv" ist */
    margin-top: 1.5rem; /* Etwas näher am Formular */
    border-radius: 12px;
    /* background-color: rgba(249, 249, 249, 0.7); /* Hintergrund passend zum Formular, leicht transparent */
}

.loading-spinner-wrapper.show {
    display: block;
    animation: subtleFadeIn 0.4s ease-out;
}

.modern-spinner {
    width: 45px; /* Etwas kleiner, da der Button schon pulsiert */
    height: 45px;
    border: 4px solid rgba(166, 211, 15, 0.25); /* Hellerer Rand mit Primärfarbe, leicht transparent */
    border-top-color: #8fb60d; /* Dunklere Akzentfarbe für den aktiven Teil, für besseren Kontrast */
    border-radius: 50%;
    animation: modernSpin 0.9s linear infinite; /* Etwas schnellerer Spin */
    margin: 0 auto 1rem auto;
}

.loading-spinner-wrapper p {
    margin: 0;
    font-size: 0.95rem; /* Leicht angepasste Größe */
    color: #444; /* Etwas dunkler für bessere Lesbarkeit */
    font-weight: 500;
}


.cms-result-card {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    border-left: 5px solid #a6d30f;
}

.cms-result-card.error-card {
    border-left-color: #d63638;
    animation: cardFadeInUpError 0.6s 0.1s ease-out forwards; /* Eigene Animation für Fehler, falls gewünscht */
}
.cms-result-card.error-card .cms-icon {
    color: #d63638;
}


.cms-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #f0f0f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #a6d30f;
}

.cms-info {
    flex: 1;
}

.cms-info h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}
.cms-info h3 .cms-version {
    font-size: 0.9rem;
    color: #555;
    font-weight: 400;
    margin-left: 0.5rem;
}


.cms-info p {
    margin: 0 0 1rem 0;
    color: #555;
    line-height: 1.6;
}

.url-validation-message {
    color: #d63638;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease;
    padding-left: 0.5rem;
}

.url-validation-message.show {
    opacity: 1;
    max-height: 50px;
    margin-top: 0.5rem;
}

.confidence-wrapper {
    margin-bottom: 1rem;
}
.confidence-label {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.3rem;
    display: block;
}
.confidence-meter {
    height: 6px;
    background: #e9ecf6;
    border-radius: 3px;
    overflow: hidden;
}

.confidence-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #79c42a, #5cb85c);
    transition: width 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    border-radius: 3px;
}

.confidence-text {
    display: block;
    margin-top: 0.5rem;
    color: #555;
    font-size: 0.85rem;
}

.tech-tags-wrapper {
    margin-top: 1.2rem;
}
.tech-tags-wrapper h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tech-tag {
    background: #eef1f5;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #4a5568;
    border: 1px solid #d1d8e0;
}

.advanced-info {
    margin-top: 1.5rem;
    border-top: 1px solid #e9ecf6;
    padding-top: 1.5rem;
}

.advanced-info h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    background: #f8f9fa;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #e9ecef;
}

.info-item strong {
    display: block;
    margin-bottom: 0.3rem;
    color: #343a40;
    font-weight: 500;
}
.info-item span, .info-item div {
    color: #555;
}

.security-labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.security-label {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.security-label.good {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.security-label.missing {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.scan-timestamp {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #777;
    text-align: right;
}

.share-button {
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    background: #f0f2f5;
    color: #333;
    border: 1px solid #dcdfe3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.share-button:hover {
    background-color: #e4e6eb;
    transform: translateY(-1px);
}

/* Animationen */
@keyframes subtleFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* Optionale, separate Animation für Fehlerkarten, falls sie sich anders verhalten sollen */
@keyframes cardFadeInUpError {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


@keyframes modernSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseButton { /* Pulsierende Animation für den Button im Ladezustand */
    0% {
        box-shadow: 0 0 0 0 rgba(166, 211, 15, 0.5); /* Start mit Primärfarbe, leicht transparent */
    }
    70% {
        box-shadow: 0 0 0 10px rgba(166, 211, 15, 0); /* Ausbreitender Schatten, der verblasst */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(166, 211, 15, 0);
    }
}


/* Responsivität */
@media (max-width: 600px) {
    .cms-checker-container {
        margin: 1rem;
        padding: 0;
    }
    #cms-check-form {
        padding: 1.5rem;
    }
    .cms-result-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .cms-icon {
        margin-bottom: 0.5rem;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .scan-timestamp {
        text-align: left;
    }
    .loading-spinner-wrapper {
        padding: 2rem 1rem;
    }
    .modern-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
}
