/* Profile Popup Styles */
.profile-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.profile-popup-container {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 75%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.profile-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.profile-popup-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.profile-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.profile-popup-close:hover {
    color: #111827;
    background: transparent;
}



button.profile-popup-save {
    background: #2196F3;
    color: #fff;
    padding: 5px 20px;
}

button.profile-popup-save:hover {
    opacity: 0.8;
    background: #2196F3;
}

.profile-popup-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

label.wwc_text_title_t {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



.form-group input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-group input[readonly] {
    background: #f3f4f6;
    cursor: default;
}

.learning-paths {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    min-height: 42px;
}

.program-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.badge-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.profile-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.profile-popup-footer button {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-popup-cancel {
    background: white;
    border: 1px solid #000000 !important;
    color: #000000;
}

.profile-popup-edit {
    background: #4182F9;
    color: white;
}

.profile-popup-edit:hover {
    background: #4182F9;
}

.profile-popup-cancel:hover {
    background: #4182f9;
    border-color: #4182f9 !important;
    opacity: .8;
}


/* Loading spinner */
.loading-spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: #4182F9;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* View Profile Link Styles */
.view-user-profile {
    color: #3b82f6;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.view-user-profile:hover {
    color: #4182F9;
}

.profile-popup-edit {
    background: #4182F9;
    color: white;
    border: 0;
    padding: 4px 20px;
    margin-left: 10px;
    font-size: 14px;
}
.profile-popup-edit :hover {
    background: #4182F9;
    opacity: .8;
}



.pdfemb-pagescontainer.grab-to-pan-grab {
    pointer-events: none;
}



/* Responsive Design */
@media (max-width: 768px) {
    .profile-popup-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-popup-header h2 {
        font-size: 16px;
    }
}