/* =================================================================
   VerifyCert Professional Stylesheet
   ================================================================= */

/* --- General Layout & Body --- */
body {
    background-color: #F4F6F8;
    color: #37474F; /* Default text color */
}

.verifycert-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 900px;
    margin: 50px auto;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background-color: #ffffff;
    border: 1px solid #EAECEE;
    overflow: hidden;
}

/* --- Brand Header (Top Section) --- */
.verifycert-brand-header {
    background: linear-gradient(45deg, #000035, #1565C0);
    color: #fff;
    padding: 25px 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #1976D2;
}

.verifycert-main-title {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    color: #fff;
}

/* --- Participant Info Header --- */
.verifycert-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 30px;
    padding: 30px 40px;
    background-color: #F8F9FA;
    border-bottom: 1px solid #EAECEE;
}

.verifycert-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
}

.verifycert-details h2 {
    margin: 0 0 12px 0;
    font-size: 36px;
    font-weight: 700;
    color: #263238;
    line-height: 1.2;
}

/* --- Section Title --- */
.credentials-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px 20px 40px;
}

.credentials-title {
    color: #263238;
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

/* --- Credentials Table Section --- */
.verifycert-table-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 0 40px 30px 40px;
}

.verifycert-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.verifycert-table th,
.verifycert-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #EAECEE;
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
}

.verifycert-table th {
    background-color: transparent;
    font-weight: 600;
    color: #546E7A;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom-width: 2px;
}

.verifycert-table tbody tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.verifycert-table .status-cell-valid { background-color: #4CAF50; color: #ffffff; }
.verifycert-table .status-cell-expiring-soon { background-color: #FF9800; color: #ffffff; }
.verifycert-table .status-cell-expired { background-color: #f44336; color: #ffffff; }
.verifycert-table .status-cell-invalid-date { background-color: #ECEFF1; color: #263238; }

.status-cell-valid .status-badge,
.status-cell-expiring-soon .status-badge,
.status-cell-expired .status-badge {
    color: #ffffff;
    background-color: transparent;
    font-weight: bold;
}

/* --- Footer --- */
.verifycert-footer {
    background-color: #F4F6F8;
    padding: 20px 40px;
    text-align: center;
    font-size: 14px;
    color: #546E7A;
    border-top: 1px solid #EAECEE;
}
.verifycert-footer p {
    margin: 0;
}

/* --- Alert Messages --- */
.alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; text-align: center; }
.alert-warning { color: #856404; background-color: #fff3cd; border-color: #ffeeba; }
.alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }

/* --- Participant Extra Details --- */
.participant-extra-details {
    margin-bottom: 15px;
    font-size: 18px;
    color: #546E7A;
    font-weight: 500;
}

.participant-extra-details .separator {
    margin: 0 8px;
    color: #B0BEC5;
}

.reference-ids {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.id-item .reference-id-label {
    font-size: 12px;
    font-weight: 700;
    color: #546E7A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.id-item .reference-id-value {
    font-size: 18px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    color: #0D47A1;
    background-color: #E3F2FD;
    padding: 4px 10px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 4px;
}

/* --- LinkedIn Button Styles --- */
.verifycert-name-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.verifycert-name-header h2 {
    margin-bottom: 0 !important;
}
.linkedin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0077b5;
    transition: opacity 0.2s ease-in-out;
}
.linkedin-button:hover {
    opacity: 0.7;
}

/* --- Work Experience Section --- */
.work-experience-wrapper {
    padding: 0 40px 30px 40px;
}
.experience-item {
    padding: 20px 0;
    border-bottom: 1px solid #EAECEE;
}
.experience-item:last-child {
    border-bottom: none;
    padding-bottom: 10px;
}
.experience-title {
    font-size: 18px;
    font-weight: 600;
    color: #263238;
    margin: 0 0 5px 0;
}
.experience-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 15px;
    color: #546E7A;
    margin-bottom: 15px;
}
.company-name {
    font-weight: 500;
}
.experience-dates {
    font-style: italic;
}
.experience-description {
    font-size: 15px;
    line-height: 1.6;
    color: #37474F;
    white-space: normal;
}
.experience-description p { margin: 0 0 1em 0; }
.experience-description p:last-child { margin-bottom: 0; }


/* =================================================================
   MOBILE RESPONSIVE STYLES (NEW & IMPROVED)
   ================================================================= */
@media (max-width: 768px) {
    .verifycert-container {
        margin: 10px 0; /* Use full screen width */
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .verifycert-brand-header, .verifycert-header, .credentials-header, .verifycert-table-wrapper, .verifycert-footer, .work-experience-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* --- Mobile Header --- */
    .verifycert-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .verifycert-avatar img {
        width: 120px;
        height: 120px;
    }
    .verifycert-name-header {
        justify-content: center;
    }
    .verifycert-details h2 {
        font-size: 28px;
    }
    .participant-extra-details, .reference-ids {
        justify-content: center;
    }
    
    /* MODIFIED: Add text-align center to the job title/department container */
    .participant-extra-details {
        text-align: center;
    }

    /* NEW: Add text-align center to each ID block */
    .id-item {
        text-align: center;
    }


    /* --- Mobile Credentials Table (Card View) --- */
    .verifycert-table-wrapper {
        padding-top: 10px;
    }
    .verifycert-table thead {
        display: none; /* Hide table headers */
    }
    .verifycert-table tr {
        display: block;
        border: 1px solid #EAECEE;
        border-radius: 8px;
        margin-bottom: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .verifycert-table td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #f2f2f2;
        white-space: normal;
    }
    .verifycert-table td:last-child {
        border-bottom: 0;
    }
    .verifycert-table td::before {
        content: attr(data-label); /* Display the label */
        position: absolute;
        left: 16px;
        font-weight: 600;
        color: #546E7A;
        text-align: left;
    }
    .verifycert-table td.status-cell-valid,
    .verifycert-table td.status-cell-expiring-soon,
    .verifycert-table td.status-cell-expired {
        color: #ffffff;
    }

    /* --- Mobile Work Experience --- */
    .experience-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}