/**
 * SkillCertify Public Skill Passport V2 Stylesheet
 *
 * Clean, restrained, professional credential identity presentation.
 * Adheres strictly to SkillCertify design tokens and layout contracts.
 *
 * @package SkillCertifyPro
 */

/* ==========================================================================
   1. ROOT PAGE LAYOUT & HEADER COMPENSATION
   ========================================================================== */
main.site-main.scp-public-passport-page,
.scp-public-passport-page {
    margin-top: var(--header-height, 64px) !important;
    padding-top: 0 !important;
    background-color: #FFFFFF;
    color: #1E293B;
    font-family: var(--sc-font-sans, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif);
    min-height: calc(100vh - 64px);
    box-sizing: border-box;
}

body.admin-bar .scp-public-passport-page {
    margin-top: calc(var(--header-height, 64px) + 32px);
}

@media (max-width: 782px) {
    body.admin-bar .scp-public-passport-page {
        margin-top: calc(var(--header-height, 64px) + 46px);
    }
}

.scp-passport-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .scp-passport-container {
        padding: 28px 16px 48px;
    }
}

@media (max-width: 360px) {
    .scp-passport-container {
        padding: 24px 16px 40px;
    }
}

/* Private Owner Preview Banner */
.scp-passport-preview-banner {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    color: #92400E;
}

.scp-preview-pill {
    background: #F59E0B;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
}

.scp-preview-link {
    color: #B45309;
    font-weight: 600;
    text-decoration: underline;
    margin-left: auto;
}

/* ==========================================================================
   2. IDENTITY INTRO (OPEN, MINIMAL LAYOUT)
   ========================================================================== */
.scp-identity-section {
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 36px;
    margin-bottom: 40px;
}

.scp-identity-layout {
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

/* Left: Avatar */
.scp-identity-avatar-col {
    flex-shrink: 0;
}

.scp-identity-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-identity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scp-identity-avatar-initials {
    font-size: 34px;
    font-weight: 700;
    color: #2563EB;
    background: #EFF6FF;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Center: Identity Details */
.scp-identity-details-col {
    flex: 1;
    min-width: 0;
}

.scp-identity-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.scp-identity-name {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #0A192F;
    letter-spacing: -0.02em;
    margin: 0;
}

.scp-verified-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #059669;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    padding: 3px 9px;
    border-radius: 999px;
    line-height: 1.2;
}

.scp-verified-badge-pill svg {
    flex-shrink: 0;
}

.scp-identity-headline {
    font-size: 16.5px;
    font-weight: 500;
    color: #475569;
    line-height: 1.4;
    margin-top: 6px;
    margin-bottom: 0;
}

.scp-identity-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748B;
    margin-top: 8px;
}

.scp-meta-dot {
    color: #CBD5E1;
}

.scp-identity-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.scp-identity-link {
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.scp-identity-link:hover {
    color: #1D4ED8;
    text-decoration: underline;
}

/* Right: Copy Profile Link Action */
.scp-identity-action-col {
    flex-shrink: 0;
}

.scp-btn-copy-profile {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #FFFFFF;
    color: #0A192F;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: inherit;
}

.scp-btn-copy-profile:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
}

.scp-btn-copy-profile:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px #2563EB;
}

/* ==========================================================================
   3. VERIFIED SKILLS SECTION
   ========================================================================== */
.scp-passport-section {
    margin-bottom: 48px;
}

.scp-section-header {
    margin-bottom: 18px;
}

.scp-section-heading {
    font-size: 20px;
    font-weight: 700;
    color: #0A192F;
    margin: 0 0 4px;
    letter-spacing: -0.015em;
}

.scp-section-helper {
    font-size: 14px;
    color: #64748B;
    margin: 0;
    line-height: 1.4;
}

.scp-skills-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.scp-skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #1E293B;
}

.scp-skill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #059669;
    flex-shrink: 0;
}

.scp-empty-notice {
    font-size: 14px;
    color: #64748B;
    margin: 0;
    font-style: italic;
}

/* ==========================================================================
   4. VERIFIED CREDENTIALS (2-COLUMN GRID)
   ========================================================================== */
.scp-credentials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.scp-cred-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 22px 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.scp-cred-card:hover {
    border-color: #CBD5E1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.scp-cred-card-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scp-cred-status-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #059669;
}

.scp-cred-title-row {
    margin-top: 2px;
}

.scp-cred-title {
    font-size: 18px;
    font-weight: 600;
    color: #0A192F;
    margin: 0 0 6px;
    line-height: 1.3;
}

.scp-level-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.scp-cred-meta-row {
    font-size: 13px;
    color: #64748B;
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.scp-cred-id-line {
    font-family: var(--sc-font-mono, 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace);
    font-size: 11.5px;
    color: #64748B;
    background: #F8FAFC;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #F1F5F9;
    margin-top: 2px;
    word-break: break-all;
}

/* Actions at Card Bottom */
.scp-cred-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #F1F5F9;
}

.scp-btn-card-view {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #FFFFFF;
    color: #334155;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.scp-btn-card-view:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
    color: #0A192F;
}

.scp-btn-card-verify {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #0A192F;
    color: #FFFFFF;
    border: 1px solid #0A192F;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.scp-btn-card-verify:hover {
    background: #1E293B;
    border-color: #1E293B;
}

/* "Show all credentials" Button */
.scp-show-all-wrap {
    margin-top: 24px;
    text-align: center;
}

.scp-btn-show-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F8FAFC;
    color: #0A192F;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.scp-btn-show-all:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
}

/* ==========================================================================
   5. ABOUT SECTION
   ========================================================================== */
.scp-about-section {
    border-top: 1px solid #E2E8F0;
    padding-top: 40px;
    margin-top: 48px;
}

.scp-about-body {
    max-width: 780px;
    font-size: 15px;
    line-height: 1.65;
    color: #334155;
}

/* ==========================================================================
   6. TOAST NOTIFICATION
   ========================================================================== */
.scp-passport-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0A192F;
    color: #FFFFFF;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.scp-passport-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS (<= 768px, <= 640px, <= 360px)
   ========================================================================== */
@media (max-width: 768px) {
    .scp-credentials-grid {
        grid-template-columns: 1fr;
    }

    .scp-identity-name {
        font-size: 28px;
    }
}

@media (max-width: 640px) {
    .scp-identity-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .scp-identity-avatar {
        width: 80px;
        height: 80px;
    }

    .scp-identity-name {
        font-size: 26px;
    }

    .scp-identity-headline {
        font-size: 15px;
    }

    .scp-identity-action-col {
        width: 100%;
        margin-top: 6px;
    }

    .scp-btn-copy-profile {
        width: 100%;
        justify-content: center;
    }

    .scp-cred-card {
        padding: 18px 20px;
    }
}

@media (max-width: 360px) {
    .scp-identity-name {
        font-size: 24px;
    }

    .scp-cred-actions-row {
        flex-direction: column;
        gap: 8px;
    }

    .scp-btn-card-view,
    .scp-btn-card-verify {
        width: 100%;
    }
}

/* ==========================================================================
   8. PRINT STYLESHEET
   ========================================================================== */
@media print {
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
    }

    .site-header,
    .site-footer,
    .scp-passport-preview-banner,
    .scp-identity-action-col,
    .scp-cred-actions-row,
    .scp-show-all-wrap,
    .scp-passport-toast {
        display: none !important;
    }

    .scp-public-passport-page {
        margin-top: 0 !important;
        padding: 0 !important;
    }

    .scp-passport-container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .scp-cred-card {
        border: 1px solid #CCCCCC !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}
