/* WP Modernity Checker - Public Styles */

.wpmc-widget {
    max-width: 900px;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
}

.wpmc-widget [hidden] {
    display: none !important;
}

.wpmc-widget-title {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
}

.wpmc-description {
    margin: 0 0 18px;
    color: #4b5563;
}

.wpmc-input-section,
.wpmc-overview-card,
.wpmc-category-card,
.wpmc-section,
.wpmc-loading,
.wpmc-notice {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.wpmc-input-section {
    padding: 20px;
    margin-bottom: 18px;
}

.wpmc-input-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.wpmc-input-row {
    display: flex;
    gap: 10px;
}

.wpmc-url-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #9ca3af;
    border-radius: 6px;
    padding: 11px 12px;
    font-size: 16px;
    line-height: 1.2;
}

.wpmc-url-input:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    border-color: #2563eb;
}

.wpmc-button {
    border: 0;
    border-radius: 6px;
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 0 18px;
    min-height: 44px;
    cursor: pointer;
    white-space: nowrap;
}

.wpmc-button:hover {
    background: #1e40af;
}

.wpmc-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.wpmc-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 14px 18px;
}

.wpmc-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #bfdbfe;
    border-top-color: #2563eb;
    animation: wpmc-spin 0.8s linear infinite;
}

@keyframes wpmc-spin {
    to {
        transform: rotate(360deg);
    }
}

.wpmc-notice {
    margin-bottom: 18px;
    padding: 12px 14px;
}

.wpmc-notice p {
    margin: 0;
}

.wpmc-notice-error {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}

.wpmc-notice-warning {
    border-left: 4px solid #d97706;
    background: #fffbeb;
}

.wpmc-signal-list {
    margin: 10px 0 0 18px;
}

.wpmc-overview-card {
    padding: 24px;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

.wpmc-grade-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 4px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpmc-grade {
    font-size: 32px;
    font-weight: 800;
}

.wpmc-overview-info {
    flex: 1;
    min-width: 200px;
}

.wpmc-overview-info h3 {
    margin: 0 0 6px;
    font-size: 24px;
}

.wpmc-overview-info p {
    margin: 0 0 12px;
    color: #4b5563;
}

.wpmc-score-bar-container {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: #e5e7eb;
}

.wpmc-score-bar {
    width: 0;
    height: 100%;
    transition: width 0.9s ease-out;
}

.wpmc-score-number {
    display: inline-block;
    margin-top: 6px;
    color: #374151;
    font-weight: 600;
}

.wpmc-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #4b5563;
    font-size: 14px;
}

.wpmc-categories {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.wpmc-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
}

.wpmc-category-header:hover {
    background: #f9fafb;
}

.wpmc-category-title {
    flex: 1;
    font-weight: 600;
}

.wpmc-category-bar-container {
    width: 120px;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: #e5e7eb;
}

.wpmc-category-bar {
    width: 0;
    height: 100%;
    transition: width 0.8s ease-out;
}

.wpmc-category-score {
    min-width: 44px;
    text-align: right;
    font-weight: 700;
}

.wpmc-category-toggle {
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.2s;
}

.wpmc-category-toggle.open {
    transform: rotate(180deg);
}

.wpmc-category-details {
    display: none;
    padding: 0 16px 12px;
    border-top: 1px solid #f3f4f6;
}

.wpmc-category-details.open {
    display: block;
}

.wpmc-detail-item {
    padding: 5px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.wpmc-detail-item + .wpmc-detail-item {
    border-top: 1px solid #f3f4f6;
}

/* Category items (kunnossa / puuttuu) */
.wpmc-category-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 3px solid;
}

.wpmc-category-item:last-child {
    margin-bottom: 0;
}

.wpmc-item-ok {
    background: #f0fdf4;
    border-color: #22c55e;
}

.wpmc-item-warning {
    background: #fffbeb;
    border-color: #f59e0b;
}

.wpmc-item-missing {
    background: #fef2f2;
    border-color: #ef4444;
}

.wpmc-item-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wpmc-item-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.wpmc-item-ok .wpmc-item-icon {
    color: #22c55e;
}

.wpmc-item-warning .wpmc-item-icon {
    color: #f59e0b;
}

.wpmc-item-missing .wpmc-item-icon {
    color: #ef4444;
}

.wpmc-item-detail {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    padding-left: 20px;
}

.wpmc-item-recommendation {
    font-size: 13px;
    color: #374151;
    margin-top: 6px;
    padding-left: 20px;
    font-style: italic;
}

.wpmc-category-empty {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
    padding: 10px 0;
}

.wpmc-section {
    padding: 16px;
    margin-bottom: 18px;
}

.wpmc-section h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.wpmc-plugin-tag {
    display: inline-block;
    padding: 4px 10px;
    margin: 4px 4px 0 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.wpmc-plugin-tag.neutral {
    background: #e0f2fe;
    color: #0c4a6e;
}

.wpmc-plugin-tag.legacy {
    background: #ffedd5;
    color: #9a3412;
}

/* Suositukset - uusi rakenne */
.wpmc-rec-section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.wpmc-rec-missing-title {
    color: #b45309;
}

.wpmc-rec-ok-title {
    color: #059669;
    margin-top: 20px;
}

.wpmc-recommendation {
    border-left: 4px solid;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 14px 16px;
}

.wpmc-rec-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.wpmc-rec-current {
    margin: 0 0 6px;
    font-size: 14px;
    color: #6b7280;
}

.wpmc-rec-action {
    margin: 0;
    font-size: 14px;
    color: #374151;
}

.wpmc-rec-missing.high,
.wpmc-rec-warning.high {
    background: #fef2f2;
    border-color: #ef4444;
}

.wpmc-rec-missing.medium,
.wpmc-rec-warning.medium {
    background: #fffbeb;
    border-color: #f59e0b;
}

.wpmc-rec-missing.low,
.wpmc-rec-warning.low {
    background: #f0fdf4;
    border-color: #86efac;
}

/* OK-lista */
.wpmc-rec-ok-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wpmc-rec-ok-item {
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
}

.wpmc-rec-ok-item strong {
    color: #166534;
}

.score-excellent { color: #10b981; }
.score-good { color: #22c55e; }
.score-ok { color: #84cc16; }
.score-fair { color: #eab308; }
.score-poor { color: #f97316; }
.score-bad { color: #ef4444; }

.bar-excellent { background: #10b981; }
.bar-good { background: #22c55e; }
.bar-ok { background: #84cc16; }
.bar-fair { background: #eab308; }
.bar-poor { background: #f97316; }
.bar-bad { background: #ef4444; }

@media (max-width: 700px) {
    .wpmc-input-row {
        flex-direction: column;
    }

    .wpmc-button {
        width: 100%;
    }

    .wpmc-category-bar-container {
        width: 72px;
    }
}
