/* GPL Changelog Tracker - Frontend Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --gct-primary:    #1a1a2e;
    --gct-accent:     #6c63ff;
    --gct-accent2:    #00d4aa;
    --gct-new:        #22c55e;
    --gct-update:     #6c63ff;
    --gct-manual:     #f59e0b;
    --gct-del:        #ef4444;
    --gct-surface:    #ffffff;
    --gct-surface2:   #f8f9fe;
    --gct-border:     #e5e7eb;
    --gct-text:       #1a1a2e;
    --gct-muted:      #6b7280;
    --gct-radius:     14px;
    --gct-shadow:     0 4px 24px rgba(108,99,255,0.10);
    --gct-font:       'DM Sans', -apple-system, sans-serif;
    --gct-mono:       'JetBrains Mono', monospace;
}

/* ===== Wrapper ===== */
.gct-changelog-wrap {
    font-family: var(--gct-font);
    color: var(--gct-text);
    max-width: 860px;
    margin: 0 auto;
    padding: 10px 0;
}

/* ===== Empty State ===== */
.gct-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--gct-muted);
}
.gct-empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }

/* ===== Timeline ===== */
.gct-timeline {
    position: relative;
    padding-left: 30px;
}
.gct-timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--gct-accent), var(--gct-accent2));
    border-radius: 2px;
    opacity: 0.3;
}

/* ===== Timeline Item ===== */
.gct-timeline-item {
    position: relative;
    margin-bottom: 28px;
    animation: gctFadeIn 0.4s ease both;
}
@keyframes gctFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gct-timeline-dot {
    position: absolute;
    left: -25px;
    top: 22px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    box-shadow: 0 0 0 2px var(--gct-accent);
    background: var(--gct-accent);
    z-index: 1;
}
.gct-timeline-dot.gct-badge-new    { background: var(--gct-new);    box-shadow: 0 0 0 2px var(--gct-new); }
.gct-timeline-dot.gct-badge-manual { background: var(--gct-manual); box-shadow: 0 0 0 2px var(--gct-manual); }

/* ===== Card ===== */
.gct-timeline-content {
    background: var(--gct-surface);
    border: 1px solid var(--gct-border);
    border-radius: var(--gct-radius);
    overflow: hidden;
    box-shadow: var(--gct-shadow);
    transition: box-shadow 0.2s;
}
.gct-timeline-content:hover {
    box-shadow: 0 8px 32px rgba(108,99,255,0.16);
}

/* ===== Item Header ===== */
.gct-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: var(--gct-surface2);
    border-bottom: 1px solid var(--gct-border);
    gap: 12px;
    flex-wrap: wrap;
}
.gct-item-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}
.gct-product-thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--gct-border);
}
.gct-product-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.3;
}
.gct-product-title a {
    color: var(--gct-primary);
    text-decoration: none;
}
.gct-product-title a:hover { color: var(--gct-accent); }

.gct-item-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    color: var(--gct-muted);
    flex-wrap: wrap;
}
.gct-version {
    font-family: var(--gct-mono);
    font-size: 11.5px;
    background: var(--gct-accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
}
.gct-type {
    background: var(--gct-border);
    color: var(--gct-muted);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ===== Badges ===== */
.gct-item-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.gct-badge-update { background: #ede9ff; color: var(--gct-accent); }
.gct-badge-new    { background: #dcfce7; color: var(--gct-new); }
.gct-badge-manual { background: #fef3c7; color: #d97706; }

/* ===== Changes Body ===== */
.gct-changes-body {
    padding: 18px 22px;
}

.gct-change-group {
    margin-bottom: 14px;
}
.gct-group-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gct-muted);
    margin: 0 0 10px 0;
    font-weight: 600;
}

.gct-change-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gct-change-item {
    font-size: 14px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: var(--gct-surface2);
    border-radius: 8px;
    border-left: 3px solid var(--gct-border);
}
.gct-group-acf .gct-change-item {
    border-left-color: var(--gct-accent);
}
.gct-field-label {
    font-weight: 600;
    font-size: 13px;
}
.gct-acf-label { color: var(--gct-accent); }

.gct-old-value del {
    color: var(--gct-del);
    opacity: 0.8;
    text-decoration-color: var(--gct-del);
    font-size: 13px;
}
.gct-arrow { color: var(--gct-muted); font-size: 12px; }
.gct-new-value {
    color: var(--gct-new);
    font-weight: 500;
    font-size: 13.5px;
}

/* ===== Manual Note ===== */
.gct-change-note {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: #fef9ec;
    border-left: 3px solid var(--gct-manual);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}
.gct-note-icon { flex-shrink: 0; }

.gct-new-product-msg {
    font-size: 14px;
    font-weight: 500;
    color: var(--gct-new);
    margin: 0;
    padding: 10px 14px;
    background: #dcfce7;
    border-radius: 8px;
}

/* ===== ACF Snapshot Toggle ===== */
.gct-acf-snapshot-toggle { margin-top: 10px; }

.gct-toggle-snapshot {
    background: none;
    border: 1px solid var(--gct-border);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-family: var(--gct-font);
    cursor: pointer;
    color: var(--gct-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
}
.gct-toggle-snapshot:hover {
    border-color: var(--gct-accent);
    color: var(--gct-accent);
}
.gct-toggle-arrow { margin-left: auto; font-size: 10px; transition: transform 0.2s; }
.gct-toggle-snapshot.open .gct-toggle-arrow { transform: rotate(180deg); }

.gct-acf-snapshot {
    margin-top: 10px;
    border: 1px solid var(--gct-border);
    border-radius: 10px;
    overflow: auto;
}
.gct-snapshot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.gct-snapshot-table th {
    background: var(--gct-surface2);
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gct-muted);
    border-bottom: 1px solid var(--gct-border);
}
.gct-snapshot-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--gct-border);
    vertical-align: top;
}
.gct-snapshot-table tr:last-child td { border-bottom: none; }
.gct-snapshot-table tr:nth-child(even) td { background: var(--gct-surface2); }

/* ===== Load More ===== */
.gct-load-more-wrap {
    text-align: center;
    margin-top: 24px;
}
.gct-load-more-btn {
    background: var(--gct-accent);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 14px;
    font-family: var(--gct-font);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(108,99,255,0.3);
}
.gct-load-more-btn:hover {
    background: #5b52e0;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108,99,255,0.4);
}
.gct-load-more-btn:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}
.gct-count { opacity: 0.8; font-size: 12px; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .gct-timeline { padding-left: 20px; }
    .gct-item-header { flex-direction: column; align-items: flex-start; }
    .gct-item-badge { align-self: flex-start; }
    .gct-changes-body { padding: 14px 16px; }
    .gct-item-header { padding: 14px 16px; }
}
