/**
 * TH0 PD Slides - Participant System Styles
 * Styles for registration, progress tracking, and certificates
 */

/* ========== Modal Base Styles ========== */
.pd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

.pd-modal {
    background: #1e293b;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: pd-modal-in 0.3s ease;
}

.pd-modal-wide {
    max-width: 700px;
}

.pd-modal-certificate {
    max-width: 900px;
}

@keyframes pd-modal-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.pd-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 0;
}

.pd-modal-header h2 {
    flex: 1;
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.pd-modal-icon {
    font-size: 32px;
}

.pd-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #334155;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pd-modal-close:hover {
    background: #475569;
    color: #f8fafc;
}

.pd-modal-body {
    padding: 24px;
}

/* ========== Form Styles ========== */
.pd-form-group {
    margin-bottom: 20px;
}

.pd-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
}

.pd-form-group label .required {
    color: #ef4444;
}

.pd-form-group input {
    width: 100%;
    padding: 14px 16px;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 12px;
    color: #f8fafc;
    font-size: 16px;
    transition: all 0.2s ease;
}

.pd-form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.pd-form-group input::placeholder {
    color: #64748b;
}

/* ========== Button Styles ========== */
.pd-btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.pd-btn-secondary {
    padding: 16px 24px;
    background: #334155;
    border: none;
    border-radius: 12px;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pd-btn-secondary:hover {
    background: #475569;
}

.pd-btn-small {
    padding: 8px 16px;
    background: #334155;
    border: none;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pd-btn-small:hover {
    background: #475569;
}

.pd-btn-accent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.pd-btn-accent:hover {
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.3);
}

/* ========== Home Button (Dashboard) ========== */
.pd-home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: 2px solid #fbbf24;
    border-radius: 12px;
    text-decoration: none;
    font-size: 22px;
    transition: all 0.2s ease;
    margin-right: 12px;
    position: relative;
}

.pd-home-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: scale(1.08);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.pd-home-btn::after {
    content: 'Dashboard';
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f8fafc;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.pd-home-btn:hover::after {
    opacity: 1;
}

/* ========== Navigation Dropdown ========== */
.pd-nav-dropdown {
    position: relative;
}

.pd-nav-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border: 2px solid #818cf8;
    border-radius: 10px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: pd-nav-pulse 2s ease-in-out 3;
}

@keyframes pd-nav-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
}

.pd-nav-toggle:hover {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    transform: scale(1.02);
}

.pd-nav-current {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-nav-arrow {
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.pd-nav-dropdown.open .pd-nav-arrow {
    transform: rotate(180deg);
}

.pd-nav-header {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #334155;
    background: #0f172a;
}

.pd-nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.pd-nav-dropdown.open .pd-nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pd-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #334155;
}

.pd-nav-item:last-child {
    border-bottom: none;
}

.pd-nav-item:hover {
    background: #334155;
    color: #f8fafc;
}

.pd-nav-item.current {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    font-weight: 600;
}

/* ========== Participant Status Bar ========== */
.pd-participant-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    border-bottom: 1px solid #334155;
    flex-wrap: wrap;
    gap: 12px;
}

.pd-status-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pd-status-name,
.pd-status-school {
    font-size: 14px;
    color: #e2e8f0;
}

.pd-status-attendance {
    padding: 4px 12px;
    background: #10b981;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.pd-status-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pd-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-progress-bar-container {
    width: 120px;
    height: 8px;
    background: #334155;
    border-radius: 4px;
    overflow: hidden;
}

#pd-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

#pd-progress-text {
    font-size: 13px;
    font-weight: 600;
    color: #a5b4fc;
    min-width: 40px;
}

.pd-status-time {
    font-size: 13px;
    color: #94a3b8;
}

.pd-status-actions {
    display: flex;
    gap: 8px;
}

/* ========== Progress Dashboard ========== */
.pd-progress-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.pd-summary-card {
    flex: 1;
    background: #0f172a;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.pd-summary-value {
    font-size: 32px;
    font-weight: 800;
    color: #6366f1;
    margin-bottom: 4px;
}

.pd-summary-label {
    font-size: 13px;
    color: #94a3b8;
}

.pd-progress-table {
    width: 100%;
    border-collapse: collapse;
}

.pd-progress-table th,
.pd-progress-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.pd-progress-table th {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pd-progress-table td {
    font-size: 14px;
    color: #e2e8f0;
}

.pd-progress-mini {
    display: inline-block;
    width: 80px;
    height: 6px;
    background: #334155;
    border-radius: 3px;
    overflow: hidden;
    margin-right: 8px;
    vertical-align: middle;
}

.pd-progress-mini-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 3px;
}

.pd-progress-actions {
    margin-top: 24px;
    text-align: center;
}

/* ========== Certificate Styles ========== */
.pd-certificate {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.pd-cert-border {
    border: 8px solid #6366f1;
    padding: 8px;
}

.pd-cert-inner {
    border: 2px solid #c7d2fe;
    padding: 40px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.pd-cert-logo {
    font-size: 60px;
    margin-bottom: 16px;
}

.pd-cert-title {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.pd-cert-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #6366f1;
    margin: 0 0 24px;
}

.pd-cert-divider {
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    margin: 0 auto 24px;
}

.pd-cert-awarded {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 8px;
}

.pd-cert-name {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    font-family: 'Georgia', serif;
}

.pd-cert-school {
    font-size: 18px;
    color: #475569;
    margin: 0 0 32px;
}

.pd-cert-modules {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.pd-cert-modules-title {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 12px;
}

.pd-cert-modules ul {
    margin: 0;
    padding-left: 20px;
    color: #1e293b;
}

.pd-cert-modules li {
    margin-bottom: 6px;
    font-size: 14px;
}

.pd-cert-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.pd-cert-detail {
    text-align: center;
}

.pd-cert-detail-label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.pd-cert-detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.pd-cert-id {
    font-family: 'Consolas', 'Monaco', monospace;
    color: #6366f1;
}

.pd-cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.pd-cert-qr {
    text-align: left;
}

.pd-cert-qr-placeholder {
    width: 80px;
    height: 80px;
    background: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 8px;
}

.pd-cert-verify {
    font-size: 11px;
    color: #94a3b8;
}

.pd-cert-signature {
    text-align: right;
}

.pd-cert-signature-line {
    width: 150px;
    height: 1px;
    background: #1e293b;
    margin-bottom: 8px;
    margin-left: auto;
}

.pd-cert-signature span {
    font-size: 12px;
    color: #64748b;
}

.pd-cert-issuer {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

.pd-certificate-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.pd-certificate-actions .pd-btn-primary,
.pd-certificate-actions .pd-btn-secondary {
    width: auto;
    min-width: 150px;
}

/* ========== Facilitator Panel ========== */
.pd-facilitator-panel {
    background: #1e293b;
    border-radius: 16px;
    padding: 24px;
    margin: 20px;
    border: 2px solid #f59e0b;
}

.pd-facilitator-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #334155;
}

.pd-facilitator-header h3 {
    font-size: 20px;
    color: #f59e0b;
    margin: 0;
}

.pd-participant-list {
    max-height: 400px;
    overflow-y: auto;
}

.pd-participant-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #0f172a;
    border-radius: 8px;
    margin-bottom: 8px;
    gap: 16px;
}

.pd-participant-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
}

.pd-participant-info {
    flex: 1;
}

.pd-participant-name {
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 2px;
}

.pd-participant-school {
    font-size: 12px;
    color: #94a3b8;
}

.pd-participant-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-approve-btn {
    padding: 6px 16px;
    background: #10b981;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pd-approve-btn:hover {
    background: #059669;
}

.pd-approve-btn:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
}

.pd-facilitator-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #334155;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .pd-modal {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .pd-participant-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }

    .pd-status-info {
        justify-content: center;
    }

    .pd-status-actions {
        justify-content: center;
    }

    .pd-progress-summary {
        flex-direction: column;
    }

    .pd-cert-footer {
        flex-direction: column;
        gap: 24px;
        align-items: center;
    }

    .pd-cert-signature {
        text-align: center;
    }

    .pd-cert-signature-line {
        margin: 0 auto 8px;
    }

    .pd-cert-details {
        flex-direction: column;
        gap: 16px;
    }

    .pd-certificate-actions {
        flex-direction: column;
    }

    .pd-certificate-actions .pd-btn-primary,
    .pd-certificate-actions .pd-btn-secondary {
        width: 100%;
    }
}

/* ========== Print Styles ========== */
@media print {
    .pd-modal-overlay {
        position: static;
        background: none;
        padding: 0;
    }

    .pd-modal {
        box-shadow: none;
        background: none;
    }

    .pd-modal-header,
    .pd-modal-close,
    .pd-certificate-actions {
        display: none !important;
    }

    .pd-certificate {
        border-radius: 0;
    }

    .pd-cert-inner {
        padding: 30px;
    }
}
