/* ── GamiPress Certificates v5 — Front-end Styles ──────────── */

/* Login notice */
.gpc-login-notice {
    font-size: 15px;
    color: #555;
    padding: 16px;
    background: #f0f9ff;
    border-left: 4px solid #03A9F4;
    border-radius: 4px;
}

/* Dashboard shell — wider to allow 3 columns */
.gpc-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.gpc-dashboard-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #0A1A2E;
    color: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}
.gpc-avatar-img {
    border-radius: 50%;
    border: 3px solid #03A9F4;
    width: 64px !important;
    height: 64px !important;
}
.gpc-header-info { flex: 1; }
.gpc-welcome {
    font-size: 12px;
    font-weight: 600;
    color: #5DCBFD;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.gpc-user-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}
.gpc-cert-count {
    text-align: center;
    background: rgba(3,169,244,0.15);
    border: 1px solid rgba(3,169,244,0.4);
    border-radius: 10px;
    padding: 10px 20px;
}
.gpc-count-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #FFC107;
    line-height: 1;
}
.gpc-count-label {
    display: block;
    font-size: 11px;
    color: #5DCBFD;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* Empty state */
.gpc-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8fbff;
    border: 2px dashed #bde0f7;
    border-radius: 12px;
}
.gpc-empty-icon { font-size: 52px; margin-bottom: 12px; }
.gpc-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: #0A1A2E;
    margin-bottom: 8px;
}
.gpc-empty-desc { font-size: 14px; color: #5A7A8A; }

/* Grid — 3 columns on wide screens */
.gpc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Card */
.gpc-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(10,26,46,0.10);
    padding: 0 0 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-top: 4px solid #03A9F4;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    overflow: hidden;
}
.gpc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(3,169,244,0.04) 0%, transparent 60%);
    pointer-events: none;
}
.gpc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 22px rgba(10,26,46,0.16);
}
.gpc-card-belts  { border-top-color: #1565C0; }
.gpc-card-badges { border-top-color: #6A1B9A; }

/* Award image area */
.gpc-card-media {
    width: 100%;
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f6ff;
    margin-bottom: 14px;
    padding: 6px;
    box-sizing: border-box;
}
.gpc-card-belts  .gpc-card-media { background: #E3F2FD; }
.gpc-card-badges .gpc-card-media { background: #F3E5F5; }

.gpc-card-award-img {
    max-width: 100%;
    max-height: 108px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
.gpc-card-icon-emoji {
    font-size: 64px;
    line-height: 1;
}

/* Padding for content below media area */
.gpc-card-type,
.gpc-card-name,
.gpc-card-meta,
.gpc-card-footer {
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* Type pill */
.gpc-card-type { margin-bottom: 8px; }
.gpc-type-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.gpc-type-belts  { background: #E3F2FD; color: #1565C0; }
.gpc-type-badges { background: #F3E5F5; color: #6A1B9A; }

/* Award name */
.gpc-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #0A1A2E;
    margin-bottom: 10px;
    line-height: 1.3;
}

/* Meta row */
.gpc-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}
.gpc-card-date {
    font-size: 12px;
    color: #5A7A8A;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.gpc-card-date svg { color: #03A9F4; flex-shrink: 0; }
.gpc-card-id {
    font-size: 10px;
    color: #aaa;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
}

/* Footer / download button */
.gpc-card-footer { margin-top: auto; }
.gpc-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    background: #0A1A2E;
    color: #5DCBFD !important;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
    box-sizing: border-box;
}
.gpc-download-btn:hover {
    background: #03A9F4;
    color: #fff !important;
}
.gpc-card-belts  .gpc-download-btn { background: #1565C0; }
.gpc-card-badges .gpc-download-btn { background: #6A1B9A; }
.gpc-card-belts  .gpc-download-btn:hover { background: #1976D2; }
.gpc-card-badges .gpc-download-btn:hover { background: #7B1FA2; }

.gpc-unavailable {
    display: block;
    font-size: 11px;
    color: #b71c1c;
    font-style: italic;
    padding: 8px 0;
}

/* Load button bar */
.gpc-load-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.gpc-load-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    background: #0A1A2E;
    color: #5DCBFD;
    border: 1.5px solid rgba(3,169,244,0.4);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
    line-height: 1.4;
}
.gpc-load-btn:hover:not(:disabled) {
    background: #03A9F4;
    color: #fff;
    border-color: #03A9F4;
}
.gpc-load-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.gpc-load-msg {
    font-size: 13px;
    color: #5A7A8A;
    font-style: italic;
    min-height: 1.4em;
}
.gpc-load-msg.ok  { color: #166534; font-style: normal; font-weight: 600; }
.gpc-load-msg.err { color: #b71c1c; font-style: normal; }

/* ── Responsive breakpoints ─────────────────────────────────── */

/* 2 columns: medium screens (e.g. tablet landscape, narrow desktop) */
@media (max-width: 1100px) {
    .gpc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .gpc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1 column: mobile */
@media (max-width: 600px) {
    .gpc-dashboard-header {
        flex-wrap: wrap;
    }
    .gpc-cert-count {
        width: 100%;
        display: flex;
        gap: 8px;
        align-items: center;
        justify-content: center;
    }
    .gpc-count-num { font-size: 22px; }
    .gpc-grid {
        grid-template-columns: 1fr;
    }
}
