/**
 * EPT Validator - Metabox & Sidebar Styles
 * Works with Classic Editor and Block Editor
 * 
 * @package EPT_Validator
 * @since 1.0.0
 */

/* ============================================
   COMMON STYLES (Classic + Gutenberg)
   ============================================ */

.ept-metabox-wrapper,
.ept-sidebar-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

/* Info Box (Usage Counter) */
.ept-info-box {
    background: #f0f6ff;
    border: 1px solid #c7d9f1;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 12px;
}

.ept-info-text {
    font-size: 13px;
    color: #1e3a5f;
    margin: 0;
    line-height: 1.6;
}

.ept-info-text strong {
    color: #2563eb;
    font-weight: 600;
}

/* Validate Button */
.ept-validate-button {
    width: 100%;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: white !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border-radius: 4px;
}

.ept-validate-button:hover:not(:disabled) {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.ept-validate-button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Result Cards */
.ept-result-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.ept-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ept-result-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.ept-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.ept-result-description {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Score Badge */
.ept-score-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.ept-score-excellent {
    background: #d1fae5;
    color: #065f46;
}

.ept-score-good {
    background: #dbeafe;
    color: #1e40af;
}

.ept-score-medium {
    background: #fef3c7;
    color: #92400e;
}

.ept-score-poor {
    background: #fee2e2;
    color: #991b1b;
}

/* Statistics List */
.ept-stats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #374151;
}

.ept-stats-list li {
    padding: 4px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ept-stats-list li:last-child {
    border-bottom: none;
}

.ept-stats-list strong {
    float: right;
    color: #111827;
    font-weight: 600;
}

/* Structure Checks */
.ept-checks-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
}

.ept-checks-list li {
    padding: 6px 0;
}

.ept-checks-list .check-pass {
    color: #059669;
}

.ept-checks-list .check-fail {
    color: #dc2626;
}

/* Warnings */
.ept-warnings {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.ept-warnings-title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 8px 0;
}

.ept-warnings-list {
    list-style: disc;
    margin: 0;
    padding-left: 20px;
    font-size: 12px;
    color: #78350f;
}

.ept-warnings-list li {
    margin-bottom: 4px;
}

/* Pro CTA */
.ept-pro-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    color: white;
    text-align: center;
}

.ept-pro-cta p {
    margin: 0 0 12px 0;
    font-size: 14px;
}

.ept-pro-cta ul {
    list-style: none;
    margin: 0 0 12px 0;
    padding: 0;
    font-size: 13px;
    text-align: left;
}

.ept-pro-cta ul li {
    padding: 4px 0 4px 20px;
    position: relative;
}

.ept-pro-cta ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: bold;
}

.ept-pro-cta .button {
    background: white !important;
    color: #667eea !important;
    border: none !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    transition: transform 0.2s ease;
}

.ept-pro-cta .button:hover {
    transform: scale(1.05);
}

/* ============================================
   CLASSIC EDITOR SPECIFIC
   ============================================ */

#italseva_validator_simple .inside {
    margin: 0;
    padding: 12px;
}

#ept-validate-meta-btn {
    margin-bottom: 12px;
}

/* ============================================
   GUTENBERG SPECIFIC
   ============================================ */

.ept-validator-sidebar .components-panel__body {
    border-top: 1px solid #e0e0e0;
}

.ept-validator-sidebar .components-panel__body-toggle {
    padding: 16px;
}

.ept-validator-sidebar .components-panel__row {
    display: block;
    padding: 0;
}

/* Gutenberg notices */
.ept-sidebar-content .notice {
    margin: 12px 0;
    padding: 8px 12px;
}

.ept-sidebar-content .notice p {
    margin: 0;
    font-size: 13px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 782px) {
    .ept-result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ept-score-badge {
        margin-top: 8px;
    }
    
    .ept-stats-list strong {
        float: none;
        display: block;
        margin-top: 4px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes ept-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ept-result-card,
.ept-warnings,
.ept-pro-cta {
    animation: ept-fade-in 0.3s ease-out;
}

/* Spinner for validation button */
.ept-validate-button .components-spinner {
    margin-right: 8px;
}
