/* ScrapPublisher - Dodatkowe style */

/* Globalne style */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

/* Artykuł w liście */
.article-item {
    transition: all 0.2s ease-in-out;
}

.article-item:hover {
    background-color: #f9fafb;
    transform: translateX(4px);
}

/* Modal */
#article-modal {
    transition: opacity 0.3s ease-in-out;
}

#article-modal.show {
    display: flex !important;
    animation: fadeIn 0.3s ease-in-out;
}

/* Obrazy w artykułach */
.article-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Toast notyfikacje */
.toast {
    min-width: 300px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.success {
    background-color: #10b981;
    color: white;
}

.toast.error {
    background-color: #ef4444;
    color: white;
}

.toast.info {
    background-color: #3b82f6;
    color: white;
}

.toast.warning {
    background-color: #f59e0b;
    color: white;
}

/* Badge dla statusu */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge.warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge.error {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Metadata display */
.metadata-item {
    padding: 0.75rem;
    background-color: #f9fafb;
    border-left: 4px solid #3b82f6;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.metadata-label {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.875rem;
}

.metadata-value {
    color: #1f2937;
    margin-top: 0.25rem;
}

/* Content display */
.article-content {
    line-height: 1.8;
    color: #374151;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .toast {
        min-width: auto;
        width: calc(100vw - 2rem);
    }
}

/* Przycisk publikuj w trybie loading */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

/* Zakładki */
.tab-button {
    color: #6b7280;
}

.tab-button.active {
    color: #2563eb;
    border-bottom-color: #2563eb !important;
    background-color: #eff6ff;
}
