/* ============================================================
   AI Summary System PRO+ – ai-summary.css  v12.0
   ============================================================ */

.ai-summary-block {
    margin: 28px 0;
    font-family: inherit;
}

.ai-summary-inner {
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    overflow: hidden;
}

/* ---- Header bar ---- */
.ai-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 10px;
}

.ai-summary-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
}

.ai-summary-label::before {
    content: "";
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
    animation: ai-ping 1.8s ease-in-out infinite;
}

@keyframes ai-ping {
    0%   { box-shadow: 0 0 0 0   rgba(34,197,94,0.55); }
    70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0);    }
    100% { box-shadow: 0 0 0 0   rgba(34,197,94,0);    }
}

.ai-summary-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 2px 7px;
    white-space: nowrap;
}

/* ---- Body ---- */
.ai-summary-body {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
}

/* ---- Button ---- */
.ai-summary-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    border-radius: 8px;
    padding: 9px 18px 9px 14px;
    font-size: 19px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.1);
    letter-spacing: 0.01em;
}

.ai-summary-btn::before {
    content: "⚡";
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.ai-summary-btn[aria-expanded="true"]::before {
    content: "⚡";
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.ai-summary-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2), 0 8px 20px rgba(0,0,0,0.12);
}

.ai-summary-btn:active {
    transform: translateY(0);
    filter: brightness(0.96);
    box-shadow: 0 1px 3px rgba(0,0,0,0.16);
}

.ai-summary-btn:disabled,
.ai-summary-btn[aria-busy="true"] {
    opacity: 0.7;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.ai-summary-btn[aria-busy="true"]::before {
    content: "";
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ai-spin 0.65s linear infinite;
    flex-shrink: 0;
}

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

/* Open/close arrow */
.ai-summary-btn::after {
    content: "";
    order: 2;
    width: 8px;
    height: 8px;
    margin-left: 2px;
    border-right: 2px solid rgba(255,255,255,0.9);
    border-bottom: 2px solid rgba(255,255,255,0.9);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.18s ease;
    flex-shrink: 0;
}

.ai-summary-btn[aria-expanded="true"]::after {
    transform: rotate(225deg) translateY(-2px);
}

.ai-summary-btn[aria-busy="true"]::after {
    display: none;
}

/* ---- Output ---- */
.ai-summary-output {
    display: none;
    width: 100%;
    padding: 0 16px 16px;
    box-sizing: border-box;
}

.ai-summary-output-inner {
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    animation: ai-reveal 0.22s ease both;
}

@keyframes ai-reveal {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Text content ---- */
.ai-summary-output p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.72;
    color: #334155;
}

.ai-summary-output p:last-child { margin-bottom: 0; }

.ai-summary-output h4 {
    margin: 10px 0 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
}

/* ---- Bullet list ---- */
.ai-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-summary-list li {
    display: inline;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
    padding: 9px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.ai-summary-list li::before {
    content: "";
    flex-shrink: 0;
    margin-top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #22c55e;
}

/* ---- Error ---- */
.ai-error {
    font-size: 13px;
    color: #dc2626;
    margin: 0;
}

/* ---- Skeleton ---- */
.ai-skeleton {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.ai-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e8edf3 50%, #f1f5f9 75%);
    background-size: 300% 100%;
    animation: ai-shimmer 1.5s ease-in-out infinite;
}
.ai-skeleton-line:nth-child(1) { width: 100%; }
.ai-skeleton-line:nth-child(2) { width: 85%; }
.ai-skeleton-line:nth-child(3) { width: 68%; }

@keyframes ai-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .ai-summary-body { flex-direction: column; align-items: stretch; }
    .ai-summary-btn  { justify-content: center; width: 100%; }
}

ul.ai-summary-list li{
	margin-left: 0px;
}
.ai-summary-output .ai-summary-output-inner p {margin:10px 0px !important;}
.menu-item-0 .ai-summary-block {display: none;}
