/**
 * C-Personil Widget Stylesheet
 * Layout: Card soft shadow, border-radius, foto sebelah kiri, detail personil sebelah kanan (tanpa readmore).
 */

.c-personil-container {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.c-personil-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Card Styling: Soft shadow & border-radius */
.c-personil-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.c-personil-card-item:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.c-personil-card-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
}

/* Sebelah Kiri: Foto Personil */
.c-personil-photo-col {
    flex: 0 0 120px;
    max-width: 120px;
    width: 120px;
}

.c-personil-photo {
    width: 100%;
    height: 155px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: block;
}

.c-personil-photo-placeholder {
    width: 100%;
    height: 155px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 42px;
}

/* Sebelah Kanan: Detail Personil */
.c-personil-detail-col {
    flex: 1;
    min-width: 0; /* Prevents flex overflow */
}

.c-personil-name {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 700;
    color: #9a2109;
    line-height: 1.35;
}

.c-personil-name a {
    color: #9a2109;
    text-decoration: none;
    transition: color 0.2s ease;
}

.c-personil-name a:hover {
    color: #c0392b;
    text-decoration: underline;
}

.c-personil-nip {
    font-size: 13px;
    color: #475569;
    margin-bottom: 4px;
}

.c-personil-pangkat {
    font-size: 13px;
    color: #475569;
    margin-bottom: 4px;
}

.c-personil-jabatan, .c-personil-pangkat-jabatan {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.c-personil-label {
    color: #64748b;
    font-weight: 500;
}

.c-personil-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.c-personil-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff8f5;
    color: #9a2109;
    border: 1px solid #f9d8cb;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}

.c-personil-keterangan {
    font-size: 13px;
    color: #334155;
    line-height: 1.55;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.c-personil-keterangan p {
    margin: 0 0 8px 0;
}

.c-personil-keterangan p:last-child {
    margin-bottom: 0;
}

.c-personil-empty {
    padding: 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

/* Single View Override */
.c-personil-card-item.single-view {
    max-width: 800px;
    margin: 20px 0;
}

/* Responsive Mobile Layout */
@media (max-width: 575.98px) {
    .c-personil-card-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .c-personil-photo-col {
        flex: 0 0 auto;
        max-width: 140px;
        width: 140px;
        margin-bottom: 10px;
    }

    .c-personil-badges {
        justify-content: center;
    }

    .c-personil-detail-col {
        width: 100%;
    }
}

/* Single View ID Card Styling */
.c-personil-idcard-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px 10px;
    width: 100%;
}

.c-personil-idcard {
    width: 100%;
    max-width: 540px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(154, 33, 9, 0.14), 0 5px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.c-personil-idcard:hover {
    box-shadow: 0 20px 45px rgba(154, 33, 9, 0.20), 0 8px 20px rgba(0, 0, 0, 0.08);
}

.c-personil-idcard-header {
    background: linear-gradient(135deg, #9a2109 0%, #b92c10 50%, #7a1a07 100%);
    position: relative;
    padding: 26px 20px 65px 20px;
    text-align: center;
    color: #ffffff;
}

.c-personil-idcard-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 55px;
    pointer-events: none;
}

.c-personil-idcard-top-logo {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 5;
}

.c-personil-idcard-top-logo img {
    max-height: 38px;
    max-width: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.c-personil-idcard-photo-wrap {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin-bottom: -70px;
}

.c-personil-idcard-photo {
    width: 130px;
    height: 155px;
    object-fit: cover;
    border-radius: 14px;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    background: #ffffff;
}

.c-personil-idcard-photo-placeholder {
    width: 130px;
    height: 155px;
    border-radius: 14px;
    border: 4px solid #ffffff;
    background: #f8fafc;
    color: #9a2109;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.c-personil-idcard-body {
    padding: 78px 24px 24px 24px;
    background: #ffffff;
}

.c-personil-idcard-name {
    text-align: center;
    font-size: 21px;
    font-weight: 700;
    color: #9a2109;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.c-personil-idcard-subtitle {
    text-align: center;
    font-size: 14px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 22px;
}

.c-personil-idcard-info-table {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 20px;
    border-top: 1px solid #f1f5f9;
}

.c-personil-idcard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 14px;
}

.c-personil-idcard-label {
    text-align: left;
    color: #64748b;
    font-weight: 500;
    flex: 0 0 40%;
}

.c-personil-idcard-value {
    text-align: right;
    color: #0f172a;
    font-weight: 600;
    flex: 0 0 60%;
    word-break: break-word;
}

.c-personil-idcard-value.bold {
    font-weight: 700;
    color: #9a2109;
}

.c-personil-idcard-keterangan {
    background: #fff8f5;
    border: 1px solid #f9d8cb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 15px;
}

.c-personil-idcard-keterangan-title {
    font-size: 13px;
    font-weight: 700;
    color: #9a2109;
    margin-bottom: 6px;
}

.c-personil-idcard-keterangan-content {
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
}

.c-personil-idcard-footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 14px 20px;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 2px solid #9a2109;
    text-align: center;
}

.c-personil-idcard-site-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-align: center;
    width: 100%;
}

@media (max-width: 480px) {
    .c-personil-idcard-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .c-personil-idcard-value {
        text-align: left;
    }
    .c-personil-idcard-footer {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

/* Scroll Offset & Focus Glow Animations */
.c-personil-card-item,
.c-personil-idcard-wrapper {
    scroll-margin-top: 100px;
}

.c-personil-card-item:target,
.c-personil-card-item.is-target-personil {
    border-color: #9a2109 !important;
    box-shadow: 0 0 0 4px rgba(154, 33, 9, 0.22), 0 12px 28px rgba(154, 33, 9, 0.16) !important;
    animation: cPersonilPulse 2.2s ease-in-out;
}

.c-personil-idcard-wrapper:target .c-personil-idcard,
.c-personil-idcard-wrapper.is-target-personil .c-personil-idcard {
    box-shadow: 0 0 0 5px rgba(154, 33, 9, 0.3), 0 20px 45px rgba(154, 33, 9, 0.25) !important;
    animation: cPersonilPulse 2.2s ease-in-out;
}

@keyframes cPersonilPulse {
    0% {
        transform: scale(0.98);
        box-shadow: 0 0 0 0 rgba(154, 33, 9, 0.6);
    }
    40% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(154, 33, 9, 0.35);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(154, 33, 9, 0);
    }
}

/* ==========================================================================
   Admin Appearance -> Menus (nav-menus.php) C-Personil Metabox Styles
   ========================================================================== */
#c-personil-nav-box .c-personil-checklist {
    max-height: 250px;
    overflow-y: auto;
    padding: 6px 8px;
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    margin: 0;
}

#c-personil-nav-box .c-personil-nav-item {
    margin: 0 0 6px 0;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: background 0.15s ease, border-color 0.15s ease;
    list-style: none;
}

#c-personil-nav-box .c-personil-nav-item:hover {
    background: #fff8f5;
    border-color: #f9d8cb;
}

#c-personil-nav-box .c-personil-nav-label {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.35;
    margin: 0;
}

#c-personil-nav-box .c-personil-nav-label input[type="checkbox"] {
    margin-top: 3px !important;
    flex: 0 0 auto;
}

#c-personil-nav-box .c-personil-nav-avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    margin-top: 1px;
}

#c-personil-nav-box .c-personil-nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#c-personil-nav-box .c-personil-nav-avatar .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #64748b;
}

#c-personil-nav-box .c-personil-nav-text-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#c-personil-nav-box .c-personil-nav-name {
    color: #0f172a;
    font-weight: 600;
    font-size: 12.5px;
    word-break: break-word;
}

#c-personil-nav-box .c-personil-nav-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-size: 11px;
    color: #64748b;
}

#c-personil-nav-box .c-personil-nav-jabatan {
    color: #9a2109;
    font-weight: 600;
}

#c-personil-nav-box .c-personil-nav-nip {
    color: #475569;
}

#c-personil-nav-box .c-personil-nav-group {
    background: #fee2e2;
    color: #991b1b;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

#c-personil-nav-box .c-personil-nav-empty {
    padding: 12px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    font-style: italic;
}
