/* Article Boundaries CSS */

/* Article boundary overlays - invisible by default, visible on hover */
.article-boundary {
    box-sizing: border-box;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background-color: transparent;
    cursor: pointer;
}

.article-boundary:hover {
    border: 2px solid #007bff;
    background-color: #3b82f61a !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Article number labels - invisible by default, visible on parent hover */
.article-number-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    user-select: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-boundary:hover .article-number-label {
    opacity: 1;
}

/* Article boundaries button styles (deprecated - buttons removed) */

/* Modal animations */
.article-modal-overlay {
    animation: fadeIn 0.3s ease;
}

.article-modal {
    animation: slideIn 0.3s ease;
}

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

/* Responsive design */
@media (max-width: 768px) {
    .article-modal {
        width: 95%;
        max-height: 90vh;
        margin: 10px;
    }
    
    .article-modal-header {
        padding: 15px;
    }
    
    .article-modal-body {
        padding: 15px;
        max-height: 70vh;
    }
    
    .article-modal-footer {
        padding: 10px 15px;
        flex-direction: column;
        gap: 8px;
    }
    
    .article-modal-footer .btn {
        width: 100%;
    }
    
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .article-boundary {
        border-width: 3px !important;
        background-color: rgba(0, 123, 255, 0.2) !important;
    }
    
    .article-number-label {
        border: 2px solid white;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .article-modal {
        background: #2d3748;
        /* color: #e2e8f0; */
        
    }
    
    .article-modal-header,
    .article-modal-footer {
        background-color: #1a202c;
        border-color: #4a5568;
    }
    
    .article-modal-close {
        color: #a0aec0;
    }
    
    .article-modal-close:hover {
        color: #e2e8f0;
    }
    
    .article-meta {
        border-color: #4a5568;
    }
}

/* Print styles */
@media print {
    .article-boundary,
    .article-modal-overlay {
        display: none !important;
    }
}

/* Accessibility improvements */
.article-boundary:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}


/* Smooth scrolling for highlight */
html {
    scroll-behavior: smooth;
}

/* Error and success message styles */
.error-message,
.no-articles-message {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.error-message {
    animation: slideInRight 0.3s ease;
}

.no-articles-message {
    animation: fadeIn 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
