/* Processing Scope Summary Modal - Premium Professional Design */

.ps-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ps-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ps-modal-content {
    background: #0a0a0a; /* Changed to match your app's --bg-dark */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    width: 90%;
    max-width: 720px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.ps-modal-overlay.active .ps-modal-content {
    transform: translateY(0) scale(1);
}

/* Header */
.ps-modal-header {
    padding: 40px 40px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.ps-modal-title {
    font-size: 28px;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Body */
.ps-modal-body {
    padding: 40px;
}

/* Document info section */
.ps-document-info {
    margin-bottom: 40px;
}

/* Explanation section */
.ps-explanation-section {
    margin-bottom: 36px;
}

.ps-explanation {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin: 0;
    text-align: left; /* Changed from justify !important to left */
    background: rgba(67, 132, 255, 0.04);
    padding: 32px 48px;
    border-radius: 16px;
    border: 1px solid rgba(67, 132, 255, 0.25);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    white-space: normal; /* Ensures normal text wrapping */
    word-wrap: break-word; /* Prevents awkward word breaks */
}

/* Hover effect with blue theme */
.ps-explanation:hover {
    background: rgba(67, 132, 255, 0.06);
    border-color: rgba(67, 132, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 132, 255, 0.15);
}

/* Highlighted text within explanation */
.ps-highlight {
    background: rgba(67, 132, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    color: rgba(255, 255, 255, 1);
    display: inline-block;
    line-height: 1.6;
}

.ps-info-label {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 28px;
    text-align: center;
    font-weight: 400;
}

/* Stats Container */
.ps-stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ps-stat-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 36px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.ps-stat-card.ps-total {
    border-color: rgba(67, 132, 255, 0.25);
    background: rgba(67, 132, 255, 0.04);
}

.ps-stat-card.ps-cited {
    border-color: rgba(67, 132, 255, 0.25);
    background: rgba(67, 132, 255, 0.04);
}

.ps-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ps-stat-card.ps-cited:hover {
    border-color: rgba(67, 132, 255, 0.4);
    background: rgba(67, 132, 255, 0.06);
    box-shadow: 0 20px 40px -15px rgba(67, 132, 255, 0.4); /* Changed from green */
}

.ps-stat-number {
    font-size: 64px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 12px;
}

.ps-stat-card.ps-total .ps-stat-number {
    color: #4384ff;
}

.ps-stat-card.ps-cited .ps-stat-number {
    color: #4384ff;
}

.ps-stat-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Explanation section */
.ps-explanation-section {
    margin-bottom: 36px;
}

/* Uncited section */
.ps-uncited-section {
    margin-bottom: 20px;
    text-align: center;
}

.ps-uncited-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 14px 24px;
    border-radius: 10px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ps-uncited-btn:hover {
    background: rgba(255, 255, 255, 0.05); /* Subtle white background */
    border-color: rgba(255, 255, 255, 0.25); /* Brighter border */
    transform: translateY(-1px); /* Slight raise effect */
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1); /* Subtle glow */
    /* Removed color change - keeps original text color */
}

.ps-uncited-btn.active {
    background: rgba(255, 255, 255, 0.08); /* Slightly brighter than hover */
    border-color: rgba(255, 255, 255, 0.3); /* Even brighter border */
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.15); /* Stronger glow */
    /* Removed color change - keeps original text color */
}

/* Uncited list */
.ps-uncited-list {
    margin-top: 24px;
    max-height: 320px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
}

.ps-uncited-item {
    display: flex;
    gap: 16px;
    padding: 12px 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.ps-uncited-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.ps-uncited-item:last-child {
    margin-bottom: 0;
}

.ps-item-number {
    color: #4384ff; /* Changed from #64ffda (cyan/green) to blue */
    flex-shrink: 0;
    font-weight: 600;
    min-width: 40px;
}

.ps-item-url {
    word-break: break-word;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Footer */
.ps-modal-footer {
    padding: 32px 40px 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Back button */
.ps-back-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ps-back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

/* Continue button - matching your app's gradient style */
.ps-start-btn {
    background: linear-gradient(135deg, #4384ff, #7b42ff);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(67, 132, 255, 0.25);
}

.ps-start-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(67, 132, 255, 0.35);
}

.ps-start-btn:active {
    transform: translateY(0);
}

/* Enhanced scrollbar */
.ps-uncited-list::-webkit-scrollbar {
    width: 8px;
}

.ps-uncited-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.ps-uncited-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.ps-uncited-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ps-stat-card.ps-total:hover {
    border-color: rgba(67, 132, 255, 0.4);
    background: rgba(67, 132, 255, 0.06);
    box-shadow: 0 20px 40px -15px rgba(67, 132, 255, 0.4);
}

.ps-stat-card.ps-total:hover {
    border-color: rgba(67, 132, 255, 0.4);
    background: rgba(67, 132, 255, 0.06);
    box-shadow: 0 20px 40px -15px rgba(67, 132, 255, 0.4);
}

/* Responsive */
@media (max-width: 640px) {
    .ps-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .ps-stats-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ps-stat-number {
        font-size: 48px;
    }
    
    .ps-modal-footer {
        flex-direction: column-reverse;
        gap: 16px;
    }
    
    .ps-back-btn,
    .ps-start-btn {
        width: 100%;
    }
}

/* Loading note */

.ps-load-more-note {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
}

/* No sources message */
.ps-no-sources {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
}

/* Performance optimization */
.ps-uncited-list {
    will-change: scroll-position;
}

/* Consent Section Styles */
.ps-consent-section {
    margin: 24px 0;
    padding: 24px;
    background: rgba(67, 132, 255, 0.04);
    border: 1px solid rgba(67, 132, 255, 0.2);
    border-radius: 12px;
}

.ps-privacy-notice {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.ps-privacy-notice svg {
    flex-shrink: 0;
    margin-top: 3px;  /* Fine-tune to align with text baseline */
}

.ps-privacy-notice > div {
    flex: 1;
}

.ps-privacy-points {
    margin: 18px 0 0 0 !important;  /* Force the margin */
    padding: 0;  /* Reset any padding */
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

/* Make the emphasis stronger with 700 weight */
.ps-privacy-notice .ps-emphasis {
    font-weight: 700;  /* Changed from 600 to 700 */
    color: #ffffff !important;
}

.ps-privacy-notice strong {
    color: #4384ff;
    font-weight: 600;
    font-size: 20px;
}

.ps-consent-boxes {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.ps-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ps-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.ps-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4384ff;
}

.ps-checkbox-label span {
    flex: 1;
    line-height: 1.4;
}

.ps-consent-reminder {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 184, 77, 0.1);
    border: 1px solid rgba(255, 184, 77, 0.3);
    padding: 16px 24px;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

.ps-reminder-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffb84d;
    font-size: 14px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Disabled button state - matching app style */
.ps-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.ps-start-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.ps-privacy-notice strong:first-child {
    background: linear-gradient(135deg, #4384ff, #7b42ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: 22px;  /* Increased from 18px to 22px */
    display: inline;
    line-height: 24px;
    vertical-align: middle;
}

.ps-privacy-notice p {
    margin: 0;
    font-size: 18px;  /* Increased from 16px to 18px */
    line-height: 1.8;  /* Adjusted for larger text */
    color: rgba(255, 255, 255, 0.9);
}

/* Add this new rule to make bullet points larger */
.ps-privacy-notice .ps-bullet {
    font-size: 18px;  /* Larger than text */
    line-height: 1;
    vertical-align: middle;
    margin-right: 4px;
}