/* ===== Comic Collector — Public Collection Shortcode ===== */
.cc-public-collection { max-width: 1200px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }

.cc-pub-header { display: flex !important; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.cc-pub-stats { display: flex; gap: 16px; font-size: 14px; color: #555; white-space: nowrap; flex-shrink: 0; }
.cc-pub-stats strong { color: #1e3a5f; }
.cc-pub-filters { display: flex !important; gap: 8px; flex-wrap: nowrap; align-items: center; flex: 1; justify-content: flex-end; }
.cc-pub-filters input[type="search"] { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; min-width: 140px; max-width: 200px; }
.cc-pub-filters select { padding: 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; min-width: 0; }
.cc-pub-filters button { padding: 8px 16px; background: #1e3a5f; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; flex-shrink: 0; }
.cc-pub-filters button:hover { background: #2d4f7e; }
@media (max-width: 768px) {
    .cc-pub-header { flex-direction: column; align-items: stretch; }
    .cc-pub-filters { flex-wrap: wrap; justify-content: flex-start; }
    .cc-pub-filters input[type="search"] { max-width: 100%; flex: 1; }
}

/* Grid */
.cc-pub-grid {
    display: grid;
    grid-template-columns: repeat(var(--cc-cols, 4), 1fr);
    gap: 16px;
}
@media (max-width: 900px) { .cc-pub-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .cc-pub-grid { grid-template-columns: repeat(2, 1fr); } }

/* Card */
.cc-pub-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
}
.cc-pub-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }

.cc-pub-img {
    position: relative; width: 100%; aspect-ratio: 2/3; background: #f5f5f5;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cc-pub-img img { width: 100%; height: 100%; object-fit: cover; }
.cc-pub-placeholder { font-size: 48px; opacity: 0.2; }
.cc-pub-buy-badge {
    position: absolute; top: 8px; right: 8px;
    background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 99px; text-decoration: none;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.cc-pub-info { padding: 12px 14px; }
.cc-pub-info h4 { font-size: 14px; font-weight: 700; margin: 0 0 4px; color: #1e3a5f; line-height: 1.3; }
.cc-pub-info h4 span { color: #f59e0b; }
.cc-pub-meta { font-size: 12px; color: #888; margin: 0 0 4px; }
.cc-pub-variant { font-size: 11px; color: #f59e0b; font-weight: 700; margin: 0 0 4px; }
.cc-pub-artist { font-size: 11px; color: #6366f1; margin: 0 0 4px; }
.cc-pub-slab { font-size: 11px; color: #8b5cf6; font-weight: 700; margin: 0 0 4px; }
.cc-pub-value { font-size: 15px; font-weight: 800; color: #22c55e; margin: 6px 0 0; }
.cc-pub-buy-link {
    display: inline-block; margin-top: 8px; padding: 6px 14px;
    background: #f59e0b; color: #fff; font-size: 12px; font-weight: 700;
    border-radius: 6px; text-decoration: none; transition: background 0.2s;
}
.cc-pub-buy-link:hover { background: #d97706; color: #fff; }

.cc-pub-ebay-link {
    display: inline-block; margin-top: 6px; padding: 4px 10px;
    background: #e5e7eb; color: #374151; font-size: 11px; font-weight: 600;
    border-radius: 5px; text-decoration: none; transition: background 0.2s, color 0.2s;
}
.cc-pub-ebay-link:hover { background: #3b82f6; color: #fff; }

.cc-pub-empty { text-align: center; padding: 40px; color: #888; font-size: 16px; }

/* Showing indicator */
/* Alphabet Filter Bar */
.cc-pub-alpha-bar {
    display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
    margin-bottom: 16px; padding: 8px 0;
}
.cc-pub-alpha-btn {
    display: inline-block; padding: 4px 8px; font-size: 13px; font-weight: 600;
    text-decoration: none; color: #555; background: #f3f4f6; border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.cc-pub-alpha-btn:hover { background: #e5e7eb; color: #1e3a5f; }
.cc-pub-alpha-active { background: #1e3a5f; color: #fff; }
.cc-pub-alpha-active:hover { background: #2d4f7e; color: #fff; }
@media (max-width: 480px) {
    .cc-pub-alpha-btn { padding: 4px 5px; font-size: 11px; }
}

.cc-pub-showing {
    font-size: 13px; color: #888; margin-bottom: 16px; padding: 0 2px;
}
.cc-pub-showing strong { color: #555; }

/* Pagination */
.cc-pub-pagination {
    display: flex; justify-content: center; align-items: center; gap: 4px;
    margin-top: 24px; padding: 16px 0; flex-wrap: wrap;
}
.cc-pub-pagination a, .cc-pub-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px;
    font-size: 14px; font-weight: 600; text-decoration: none;
    border: 1px solid #ddd; color: #333; white-space: nowrap;
}
.cc-pub-pagination a:hover { background: #f5f5f5; border-color: #999; }
.cc-pub-pagination .current { background: #1e3a5f; color: #fff; border-color: #1e3a5f; }
.cc-pub-pagination .cc-page-prev,
.cc-pub-pagination .cc-page-next { font-size: 13px; padding: 0 12px; }
.cc-pub-pagination .disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.cc-pub-pagination .cc-page-dots { border: none; min-width: 24px; color: #999; font-size: 16px; letter-spacing: 2px; }

/* Make Offer Button */
.cc-pub-offer-btn {
    display: inline-block; margin-top: 8px; padding: 6px 14px;
    background: #1e3a5f; color: #fff; font-size: 12px; font-weight: 700;
    border: none; border-radius: 6px; cursor: pointer; transition: background 0.2s;
    width: 100%; text-align: center;
}
.cc-pub-offer-btn:hover { background: #2d4f7e; }

/* Offer Modal Overlay */
.cc-offer-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.cc-offer-modal {
    background: #fff; border-radius: 14px; padding: 28px 24px;
    width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
    position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: ccModalIn 0.2s ease-out;
}
@keyframes ccModalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.cc-offer-close {
    position: absolute; top: 12px; right: 14px;
    background: none; border: none; font-size: 24px; color: #999;
    cursor: pointer; line-height: 1; padding: 4px;
}
.cc-offer-close:hover { color: #333; }

.cc-offer-modal h3 {
    margin: 0 0 12px; font-size: 20px; font-weight: 800; color: #1e3a5f;
}

.cc-offer-comic-info {
    background: #f8f9fa; border-radius: 8px; padding: 12px 14px;
    margin-bottom: 20px; display: flex; flex-direction: column; gap: 2px;
}
.cc-offer-comic-info strong { font-size: 15px; color: #1e3a5f; }
.cc-offer-comic-info span { font-size: 12px; color: #888; }
#cc-offer-value { color: #22c55e; font-weight: 700; font-size: 13px; }

/* Form fields */
.cc-offer-field { margin-bottom: 14px; }
.cc-offer-field label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 4px; }
.cc-offer-field label small { font-weight: 400; color: #999; }
.cc-offer-field input,
.cc-offer-field textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px;
    font-size: 14px; transition: border-color 0.2s; box-sizing: border-box;
    font-family: inherit;
}
.cc-offer-field input:focus,
.cc-offer-field textarea:focus { border-color: #1e3a5f; outline: none; box-shadow: 0 0 0 3px rgba(30,58,95,0.1); }

.cc-offer-amount-wrap {
    position: relative; display: flex; align-items: center;
}
.cc-offer-dollar {
    position: absolute; left: 12px; font-size: 14px; color: #999; font-weight: 600;
}
.cc-offer-amount-wrap input { padding-left: 26px; }

/* Actions */
.cc-offer-actions {
    display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 18px;
}
.cc-offer-submit-btn {
    width: 100%; padding: 12px; background: #1e3a5f; color: #fff;
    font-size: 15px; font-weight: 700; border: none; border-radius: 8px;
    cursor: pointer; transition: background 0.2s;
}
.cc-offer-submit-btn:hover:not(:disabled) { background: #2d4f7e; }
.cc-offer-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.cc-offer-email-link { font-size: 13px; color: #1e3a5f; text-decoration: none; }
.cc-offer-email-link:hover { text-decoration: underline; }

/* Status messages */
.cc-offer-status {
    margin-top: 12px; padding: 10px 14px; border-radius: 8px;
    font-size: 13px; font-weight: 500; text-align: center;
}
.cc-offer-status-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.cc-offer-status-info { background: #eff6ff; color: #1e3a5f; border: 1px solid #bfdbfe; }

/* Success state */
.cc-offer-success { text-align: center; padding: 20px 0; }
.cc-offer-checkmark { font-size: 48px; margin-bottom: 12px; }
.cc-offer-success p { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: #1e3a5f; }
.cc-offer-success .cc-offer-success-sub { font-size: 13px; color: #888; font-weight: 400; }

/* ===== Key Issue Styles — Public Shortcode ===== */

/* KEY ribbon on cover image corner */
.cc-key-ribbon {
    position: absolute;
    top: 8px;
    right: -4px;
    background: #f59e0b;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    z-index: 2;
}

/* Key info block in card detail */
.cc-key-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    margin: 8px 0;
    flex-wrap: wrap;
}
.cc-key-info .cc-key-badge {
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    display: inline-block;
}
.cc-key-reason {
    font-style: italic;
    color: #92400e;
    font-size: 13px;
}
.cc-key-categories {
    font-size: 11px;
    color: #78350f;
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 3px;
}

/* ===== Variant Cover — Frontend ===== */

/* Container for variant section under the parent card */
.cc-variant-group {
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 8px;
}

/* Clickable "Variants: N" toggle button */
.cc-variant-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--cc-primary, #4a90d9);
    font-weight: 600;
    padding: 2px 0;
    width: 100%;
    text-align: left;
}
.cc-variant-toggle:hover { text-decoration: underline; }

/* Container revealed when toggle is open */
.cc-variant-cards {
    display: none;
    margin-top: 8px;
}

/* Individual variant card — smaller than a full card */
.cc-variant-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px solid #f0f0f0;
}
.cc-variant-card img {
    width: 36px;
    height: 54px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}
.cc-variant-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
}

/* Variant type pill badge on variant card */
.cc-variant-type-badge {
    display: inline-block;
    background: var(--cc-primary, #4a90d9);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

/* ===== Community Annotations — Public Shortcode ===== */

/* Annotation section container */
.cc-annotations {
    border-top: 1px solid #e5e7eb;
    margin-top: 10px;
    padding-top: 8px;
}

/* Colored type pill */
.cc-annotation-type-badge {
    display: inline-block;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    letter-spacing: 0.3px;
    vertical-align: middle;
    margin-bottom: 4px;
}

/* Single annotation block */
.cc-annotation-item {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}
.cc-annotation-item:last-of-type { border-bottom: none; }

.cc-annotation-text {
    font-size: 12px;
    color: #374151;
    margin: 4px 0 2px;
    line-height: 1.5;
}

/* Muted author + date line */
.cc-annotation-author {
    font-size: 11px;
    color: #9ca3af;
    margin: 0;
    font-style: italic;
}

/* Toggle button */
.cc-annotation-add-btn {
    display: inline-block;
    margin-top: 6px;
    background: none;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: #6b7280;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: border-color 0.2s, color 0.2s;
}
.cc-annotation-add-btn:hover { border-color: #9ca3af; color: #374151; }

/* Submit form (hidden by default) */
.cc-annotation-form {
    margin-top: 8px;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.cc-annotation-field {
    margin-bottom: 8px;
}
.cc-annotation-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
}
.cc-annotation-field label small { font-weight: 400; color: #9ca3af; }
.cc-annotation-field input,
.cc-annotation-field select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    box-sizing: border-box;
    font-family: inherit;
}
.cc-annotation-field input:focus,
.cc-annotation-field select:focus,
.cc-annotation-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}

/* Full-width textarea */
.cc-annotation-textarea {
    width: 100%;
    min-height: 80px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
}

.cc-annotation-form-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.cc-annot-submit-btn {
    flex: 1;
    padding: 6px 12px;
    background: #1e3a5f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.cc-annot-submit-btn:hover:not(:disabled) { background: #2d4f7e; }
.cc-annot-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.cc-annot-cancel-btn {
    padding: 6px 10px;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    transition: border-color 0.2s;
}
.cc-annot-cancel-btn:hover { border-color: #9ca3af; color: #374151; }

/* Inline status messages */
.cc-annot-status {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}
.cc-annot-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.cc-annot-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
