/* Modal Data Pengunjung — halaman publik (index, arsip, arsip-detail) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.pgn-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.pgn-overlay.is-active {
    display: flex;
    animation: pgn-fade-in 0.22s ease-out;
}

@keyframes pgn-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pgn-slide-up {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pgn-dialog {
    width: 100%;
    max-width: 36rem;
    max-height: calc(100vh - 2rem);
    animation: pgn-slide-up 0.28s ease-out;
}

.pgn-shell {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow:
        0 24px 48px rgba(15, 23, 42, 0.14),
        0 0 0 1px rgba(226, 232, 240, 0.9);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Header §2a enterprise */
.pgn-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.875rem;
    flex-shrink: 0;
    padding: 1.25rem 1.25rem 1rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.pgn-head-main {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    flex: 1 1 auto;
    min-width: 0;
}

.pgn-head-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #475569;
}

.pgn-head-text {
    min-width: 0;
}

.pgn-head-title {
    margin: 0 0 0.2rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.pgn-head-subtitle {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.pgn-head-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #eef2f7;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pgn-head-close:hover,
.pgn-head-close:focus {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
    outline: none;
}

.pgn-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.25rem 1.25rem 0.5rem;
    background: #f8fafc;
}

.pgn-form {
    margin: 0;
}

.pgn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.125rem;
}

.pgn-field {
    min-width: 0;
}

.pgn-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    color: #334155;
}

.pgn-control {
    min-width: 0;
}

.pgn-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pgn-input::placeholder {
    color: #94a3b8;
}

.pgn-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.pgn-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.pgn-error {
    display: block;
    margin-top: 0.35rem;
    color: #dc2626;
    font-weight: 500;
}

/* Segmented gender control */
.pgn-segment {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    border-radius: 10px;
    background: #eef2f7;
    border: 1px solid #e2e8f0;
}

.pgn-segment-item {
    flex: 1;
    margin: 0;
    cursor: pointer;
}

.pgn-segment-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pgn-segment-item span {
    display: block;
    padding: 0.5rem 0.625rem;
    text-align: center;
    font-weight: 500;
    color: #64748b;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pgn-segment-item input:checked + span {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.pgn-segment-item input:focus-visible + span {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

/* Captcha */
.pgn-captcha {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.pgn-captcha-hint {
    margin: 0 0 0.75rem;
    color: #64748b;
    line-height: 1.45;
}

.pgn-captcha-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.pgn-captcha-media {
    position: relative;
    flex-shrink: 0;
}

.pgn-captcha-media img {
    display: block;
    width: 9rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.pgn-captcha-media img:hover {
    border-color: #94a3b8;
}

.pgn-captcha-refresh {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: #3b82f6;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.2s ease;
}

.pgn-captcha-refresh:hover {
    background: #2563eb;
    transform: rotate(90deg);
}

.pgn-captcha-input {
    flex: 1;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Footer */
.pgn-foot {
    display: flex;
    flex-shrink: 0;
    justify-content: flex-end;
    gap: 0.625rem;
    padding: 1rem 1.25rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.pgn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.625rem 1.125rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pgn-btn--ghost {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #475569;
}

.pgn-btn--ghost:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.pgn-btn--primary {
    background: #2563eb;
    color: #ffffff;
}

.pgn-btn--primary:hover {
    background: #1d4ed8;
}

@media (max-width: 640px) {
    .pgn-overlay.is-active {
        align-items: flex-end;
        padding: 0;
    }

    .pgn-dialog {
        max-width: 100%;
        max-height: 92vh;
    }

    .pgn-shell {
        border-radius: 1rem 1rem 0 0;
        max-height: 92vh;
    }

    .pgn-grid {
        grid-template-columns: 1fr;
    }

    .pgn-captcha-row {
        flex-direction: column;
    }

    .pgn-captcha-media img {
        width: 100%;
        max-width: 100%;
    }

    .pgn-foot {
        flex-direction: column-reverse;
    }

    .pgn-btn {
        width: 100%;
    }
}
