/*
 * PeptideBundles COA Manager — Public Verify Page Styles
 * White-label: no hardcoded colours, adapts to the active WordPress theme.
 * The header and footer come from the theme itself via get_header()/get_footer().
 */

/* ── Page wrapper ── */
.pb-verify-page-wrap {
    width: 100%;
    padding: 40px 16px 60px;
    box-sizing: border-box;
}

.pb-verify-container {
    max-width: 580px;
    margin: 0 auto;
}

/* ── Search card ── */
.pb-search-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.pb-search-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: inherit;
    margin: 0 0 8px;
    line-height: 1.3;
}

.pb-search-card p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px;
    line-height: 1.6;
}

.pb-search-form {
    display: flex;
    gap: 10px;
}

.pb-search-input {
    flex: 1;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
    box-sizing: border-box;
}

.pb-search-input::placeholder {
    text-transform: none;
    letter-spacing: 0;
    font-family: inherit;
    font-weight: 400;
    color: #94a3b8;
    font-size: 14px;
}

.pb-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

/* Search button inherits theme primary colour via currentColor trick */
.pb-search-btn {
    padding: 11px 22px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.pb-search-btn:hover { opacity: .88; }

/* ── Loading ── */
.pb-loading {
    text-align: center;
    padding: 32px;
    color: #64748b;
    font-size: 14px;
}

.pb-spinner-lg {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0,102,204,.15);
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: pb-spin .7s linear infinite;
    margin: 0 auto 12px;
}

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

/* ── Result card ── */
.pb-result-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    margin-bottom: 20px;
    animation: pb-fadein .25s ease;
}

@keyframes pb-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.pb-result-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.pb-result-header .product-name {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.batch-label {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 3px 10px;
    border-radius: 6px;
    letter-spacing: .04em;
}

.pb-verified-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.check-circle {
    width: 44px;
    height: 44px;
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #065f46;
}

.check-label {
    font-size: 10px;
    font-weight: 700;
    color: #065f46;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ── Detail rows ── */
.pb-result-details { padding: 0 24px; }

.pb-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    gap: 12px;
}

.pb-detail-row:last-child { border-bottom: none; }
.pb-detail-label { color: #64748b; font-weight: 400; flex-shrink: 0; }
.pb-detail-value { color: #0f172a; font-weight: 500; text-align: right; }

.pb-pass-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #d1fae5;
    color: #065f46;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.pb-pass-badge::before { content: '✓'; }

.pb-coa-version {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #475569;
}

/* ── COA download ── */
.pb-coa-download {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.pb-coa-download p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px;
    line-height: 1.6;
}

.pb-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: #0f172a;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: opacity .15s;
    box-sizing: border-box;
}

.pb-download-btn:hover { opacity: .88; color: #fff !important; }

/* ── Not found ── */
.pb-not-found {
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 20px;
    animation: pb-fadein .25s ease;
}

.pb-not-found-icon { font-size: 36px; margin-bottom: 12px; }

.pb-not-found h3 {
    font-size: 17px;
    font-weight: 700;
    color: #b91c1c;
    margin: 0 0 10px;
}

.pb-not-found p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.7;
}

.pb-not-found a { color: #1d4ed8; }

/* ── Trust footer ── */
.pb-trust-footer {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.7;
    padding: 4px 0 20px;
}

.pb-trust-footer a { color: #64748b; text-decoration: none; }
.pb-trust-footer a:hover { text-decoration: underline; }

/* ── All COAs page ── */
.pb-all-coas-wrap { padding: 32px 16px 60px; }

.pb-all-coas-wrap h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
}

.pb-all-coas-wrap .pb-coas-intro {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 28px;
    line-height: 1.6;
}

.pb-coa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.pb-coa-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow .15s, border-color .15s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pb-coa-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    border-color: #cbd5e1;
}

.pb-coa-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.pb-coa-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.3;
}

.pb-coa-card-batch {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #1d4ed8;
    background: #eff6ff;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
}

.pb-coa-card-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pb-coa-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.pb-coa-card-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none !important;
    transition: opacity .15s;
    display: inline-block;
    box-sizing: border-box;
}

.pb-coa-card-btn:hover { opacity: .85; }

.pb-coa-btn-primary {
    background: #0066cc;
    color: #fff !important;
    border: none;
}

.pb-coa-btn-secondary {
    background: #f1f5f9;
    color: #374151 !important;
    border: 1px solid #e2e8f0;
}

.pb-coa-live-badge {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
    flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .pb-verify-page-wrap { padding: 20px 12px 40px; }
    .pb-search-card { padding: 20px 16px; }
    .pb-search-form { flex-direction: column; }
    .pb-search-btn { width: 100%; }
    .pb-result-header { flex-direction: column-reverse; align-items: flex-start; }
    .pb-result-details { padding: 0 16px; }
    .pb-coa-download { padding: 16px; }
    .pb-coa-grid { grid-template-columns: 1fr; }
}
