/* =============================================================================
   Pushi Caya Pet QR Pro — Styles
   Front-end profile card + admin meta box
   ============================================================================= */

/* ── Reset / base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Body ──────────────────────────────────────────────────────────────────── */
.pcqr-body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f6fa;
    color: #23272f;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Lost banner ───────────────────────────────────────────────────────────── */
.pcqr-lost-banner {
    width: 100%;
    background: #e53935;
    color: #fff;
    text-align: center;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    animation: pcqr-pulse 1.5s ease-in-out infinite;
}

.pcqr-lost-icon {
    font-size: 1.2rem;
    margin: 0 8px;
}

@keyframes pcqr-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .8; }
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.pcqr-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    margin: 32px 16px;
    overflow: hidden;
    flex: 1;
}

/* ── Avatar ─────────────────────────────────────────────────────────────────── */
.pcqr-avatar {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 280px;
    overflow: hidden;
    background: #f0f0f0;
}

.pcqr-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.pcqr-header {
    padding: 24px 24px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.pcqr-name {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #1a1a2e;
    letter-spacing: -.01em;
}

.pcqr-code {
    font-size: .8rem;
    color: #999;
    margin: 0 0 12px;
    font-family: monospace;
    letter-spacing: .05em;
}

/* ── Status badge ───────────────────────────────────────────────────────────── */
.pcqr-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pcqr-badge--safe {
    background: #e8f5e9;
    color: #2e7d32;
}

.pcqr-badge--lost {
    background: #ffebee;
    color: #c62828;
    animation: pcqr-pulse 1.5s ease-in-out infinite;
}

/* ── Info rows ──────────────────────────────────────────────────────────────── */
.pcqr-info {
    padding: 16px 24px;
}

.pcqr-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.pcqr-info-row:last-child {
    border-bottom: none;
}

.pcqr-info-label {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
    font-size: .8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .06em;
    flex-shrink: 0;
}

.pcqr-info-label svg {
    width: 16px;
    height: 16px;
    fill: #aaa;
    flex-shrink: 0;
}

.pcqr-info-value {
    font-size: .95rem;
    color: #333;
    line-height: 1.5;
    word-break: break-word;
}

.pcqr-info-value a {
    color: #1565c0;
    text-decoration: none;
}

.pcqr-info-value a:hover {
    text-decoration: underline;
}

.pcqr-medical {
    white-space: pre-line;
    font-size: .9rem;
    color: #555;
}

.pcqr-info-row--medical {
    flex-direction: column;
    gap: 6px;
}

/* ── QR image ───────────────────────────────────────────────────────────────── */
.pcqr-qr {
    padding: 24px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.pcqr-qr img {
    width: 180px;
    height: 180px;
    image-rendering: pixelated;
    border: 4px solid #f0f0f0;
    border-radius: 8px;
}

.pcqr-qr-label {
    font-size: .75rem;
    color: #aaa;
    margin: 8px 0 0;
}

.pcqr-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.pcqr-btn--download {
    background-color: #007cba;
    color: #fff;
    margin-top: 12px;
}

.pcqr-btn--download:hover {
    background-color: #005a87;
}

/* ── Admin bar (visible to admins only) ─────────────────────────────────────── */
.pcqr-admin-bar {
    background: #1a1a2e;
    color: #fff;
    font-size: .8rem;
    padding: 10px 24px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pcqr-admin-bar a {
    color: #90caf9;
    text-decoration: none;
}

.pcqr-admin-bar a:hover {
    text-decoration: underline;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.pcqr-footer {
    text-align: center;
    padding: 16px;
    font-size: .75rem;
    color: #bbb;
}

.pcqr-footer a {
    color: #888;
    text-decoration: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 500px) {
    .pcqr-card {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .pcqr-name {
        font-size: 1.6rem;
    }

    .pcqr-info-label {
        min-width: 80px;
        font-size: .75rem;
    }
}

/* =============================================================================
   Admin — Meta box table
   ============================================================================= */
.pcqr-meta-table th {
    width: 150px;
    vertical-align: top;
    padding-top: 12px;
}

.pcqr-meta-table td {
    padding: 8px 0;
}

/* ── Settings page ──────────────────────────────────────────────────────────── */
.pcqr-settings-wrap h1 {
    margin-bottom: 4px;
}

/* ── Shortcode styles ────────────────────────────────────────────────────────── */
.pcqr-shortcode {
    display: inline-block;
    text-align: center;
}

.pcqr-shortcode.aligncenter {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.pcqr-shortcode.alignleft {
    float: left;
    margin-right: 20px;
}

.pcqr-shortcode.alignright {
    float: right;
    margin-left: 20px;
}

.pcqr-shortcode .pcqr-image {
    max-width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pcqr-shortcode.pcqr-shadow .pcqr-image {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pcqr-shortcode.pcqr-shadow a:hover .pcqr-image {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.pcqr-download-align {
    margin-top: 12px;
}

.pcqr-download-align.aligncenter {
    text-align: center;
}

.pcqr-download-align.alignleft {
    text-align: left;
}

.pcqr-download-align.alignright {
    text-align: right;
}

.pcqr-download-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.pcqr-download-btn:hover {
    background-color: #005a87;
}
