/* --- SCOPED CSS FOR PROGRAM DETAILS DRAWER --- */
.pd-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    justify-content: flex-end;
}

/* Floating Drawer Design */
.pd-drawer {
    width: 440px;
    max-width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    margin: 16px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    animation: pdSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    overflow: hidden;
}

@keyframes pdSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Header */
.pd-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 32px 20px 32px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    z-index: 10;
}

.pd-header-titles {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .pd-header-titles h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 700;
        color: #334155;
    }

    .pd-header-titles p {
        margin: 0;
        font-size: 13px;
        font-weight: 500;
        color: #64748b;
    }

.pd-close-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

    .pd-close-icon:hover {
        opacity: 0.6;
    }

/* Body & Scrollbar */
.pd-body {
    padding: 24px 32px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

    .pd-body::-webkit-scrollbar {
        width: 6px;
    }

    .pd-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .pd-body::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }

        .pd-body::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

/* Sections */
.pd-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 24px;
    border-bottom: 1px solid #d1fae5;
}

    .pd-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .pd-section h3 {
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        color: #10b981; /* Figma Green */
    }

/* Light Grey Info Cards */
.pd-info-card {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pd-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    line-height: 1.4;
}

.pd-label {
    color: #64748b;
    font-weight: 500;
}

.pd-value {
    color: #1e293b;
    font-weight: 600;
    text-align: right;
}

.pd-font-bold {
    font-weight: 700;
    color: #0f172a;
}

/* Approved Badge */
.pd-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.pd-badge-approved {
    background-color: #d1fae5;
    color: #059669;
}

/* Timeline Styling */
.pd-timeline {
    display: flex;
    flex-direction: column;
    padding-left: 4px;
}

.pd-tl-item {
    position: relative;
    display: flex;
    gap: 16px;
    padding-bottom: 24px;
}

    .pd-tl-item:last-child {
        padding-bottom: 0;
    }

.pd-tl-line {
    position: absolute;
    top: 24px;
    bottom: 0;
    left: 11px; /* Centers under the 24px icon */
    width: 2px;
    background-color: #10b981;
    z-index: 1;
}

.pd-tl-item:last-child .pd-tl-line {
    display: none;
}

.pd-tl-icon {
    position: relative;
    z-index: 2;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #10b981;
    flex-shrink: 0;
}

.pd-tl-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

    .pd-tl-content h4 {
        margin: 0;
        font-size: 13px;
        font-weight: 700;
        color: #1e293b;
    }

.pd-tl-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.pd-date-pill {
    background-color: #334155;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

/* Footer Buttons */
.pd-footer {
    padding: 20px 32px;
    border-top: 1px solid #f1f5f9;
    background-color: #ffffff;
    display: flex;
    gap: 16px;
}

.pd-btn-action {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pd-btn-print {
    background-color: #166534; /* Dark green */
    color: #ffffff;
}

    .pd-btn-print:hover {
        background-color: #14532d;
    }

.pd-btn-export {
    background-color: #2563eb; /* Blue */
    color: #ffffff;
}

    .pd-btn-export:hover {
        background-color: #1d4ed8;
    }

/* Responsive */
@media (max-width: 480px) {
    .pd-drawer {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
    }

    .pd-footer {
        flex-direction: column;
        padding: 16px 24px;
    }

    .pd-body {
        padding: 24px;
    }

    .pd-header {
        padding: 20px 24px;
    }
}

