/*
 * Grammar Plus — ULTRA ENGINE styles (V14 — 2027 Edition)
 *
 * Component styles for the V14 frontend. The plugin's main stylesheet is
 * intentionally lightweight: the Elementor widget carries its own full
 * inline CSS, and this file only provides the shared V14 component classes
 * used by main.js when the [grammar_plus] shortcode markup is present.
 *
 * Version: 14.0.0
 */

/* ============ Depth selector pills ============ */
.gp-depth {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 14px;
}

.gp-depth-btn {
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #475569;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    font-family: inherit;
}

.gp-depth-btn:hover {
    border-color: #038776;
    color: #038776;
}

.gp-depth-btn.active {
    background: linear-gradient(135deg, #038776, #0aa78f);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(3, 135, 118, 0.28);
}

/* ============ Category filter chips ============ */
.gp-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 14px;
}

.gp-chip {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s ease;
    font-family: inherit;
}

.gp-chip:hover { border-color: #038776; color: #038776; }

.gp-chip.active {
    background: #038776;
    border-color: #038776;
    color: #fff;
}

.gp-chip-count {
    display: inline-block;
    min-width: 18px;
    padding: 0 5px;
    margin-left: 4px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.gp-chip.active .gp-chip-count { background: rgba(255, 255, 255, 0.25); }

/* ============ Error cards (V14) ============ */
.gp-error-card {
    background: #fff;
    padding: 16px 18px;
    border-radius: 12px;
    margin-bottom: 13px;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #cbd5e1;
}

.gp-error-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.gp-error-card.gp-sev-error   { border-left-color: #dc3545; }
.gp-error-card.gp-sev-warning { border-left-color: #f59e0b; }
.gp-error-card.gp-sev-info    { border-left-color: #3b82f6; }

.gp-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.gp-card-icon { font-size: 18px; flex-shrink: 0; line-height: 1.4; }

.gp-card-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.gp-sev {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 3px 8px;
    border-radius: 6px;
}

.gp-sev.gp-sev-error   { background: #fee2e2; color: #b91c1c; }
.gp-sev.gp-sev-warning { background: #fef3c7; color: #b45309; }
.gp-sev.gp-sev-info    { background: #dbeafe; color: #1d4ed8; }

.gp-cat { font-size: 12.5px; font-weight: 700; color: #1e293b; }

.gp-rule-chip {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.gp-badge-src {
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.gp-badge-src.gp-src-ai      { background: #ede9fe; color: #6d28d9; }
.gp-badge-src.gp-src-engine  { background: #ecfdf5; color: #047857; }
.gp-badge-src.gp-src-dual    { background: #fff7ed; color: #c2410c; }

.gp-conf {
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
}

.gp-conf-high { background: #ecfdf5; color: #047857; }
.gp-conf-mid  { background: #eff6ff; color: #1d4ed8; }
.gp-conf-low  { background: #fef3c7; color: #b45309; }

.gp-card-message {
    color: #475569;
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 8px;
}

.gp-card-original {
    font-size: 12.5px;
    color: #94a3b8;
    margin-bottom: 10px;
    font-style: italic;
}

.gp-orig { color: #dc3545; text-decoration: line-through; text-decoration-thickness: 1px; }

/* ============ Suggestion box + Apply button ============ */
.gp-suggestion-box {
    background: #f8f9fa;
    border: 1px solid #eef2f7;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gp-suggestion-label {
    color: #64748b;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    width: 100%;
}

.gp-suggestion-value {
    color: #038776;
    font-weight: 700;
    flex: 1;
    min-width: 120px;
}

.gp-apply-btn {
    background: #038776;
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s ease;
    font-family: inherit;
}

.gp-apply-btn:hover { background: #026b5e; }

.gp-alts {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.gp-alts code {
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 11.5px;
    color: #334155;
    margin-right: 4px;
}

.gp-explanation {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.5;
}

/* ============ Sentence rewrites ============ */
.gp-rewrites {
    margin-top: 18px;
}

.gp-rewrites-title {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gp-rewrites-sub {
    font-size: 11.5px;
    font-weight: 600;
    color: #94a3b8;
}

.gp-rewrite-card {
    background: linear-gradient(135deg, #fafbff, #f5f3ff);
    border: 1px solid #e6e4f7;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.gp-rewrite-before {
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.55;
    text-decoration: line-through;
    text-decoration-color: #fca5a5;
    text-decoration-thickness: 1.5px;
}

.gp-rewrite-arrow {
    text-align: center;
    color: #a78bfa;
    font-size: 14px;
    margin: 6px 0;
}

.gp-rewrite-after {
    font-size: 13.5px;
    color: #1e293b;
    font-weight: 600;
    line-height: 1.6;
}

.gp-rewrite-reason {
    margin-top: 8px;
    font-size: 11.5px;
    color: #7c6ba8;
    font-style: italic;
}

.gp-rewrite-apply {
    margin-top: 10px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .18s ease;
    font-family: inherit;
}

.gp-rewrite-apply:hover { opacity: .88; }

/* ============ Metrics strip ============ */
.gp-metrics {
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 10px;
    padding: 9px 14px;
    border: 1px solid #eef2f7;
}

/* ============ Summary banner ============ */
.gp-summary {
    margin-top: 12px;
    padding: 12px 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    color: #075985;
    font-size: 13px;
    line-height: 1.55;
}
