/* 
 * Estilos Customizados - Revista CONVERGÊNCIA
 * Migrado do Next.js para PHP
 */

/* Gradientes customizados */
.convergencia-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #dc2626 50%, #d4af37 100%);
}

.convergencia-text-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #dc2626 50%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback para navegadores que não suportam */
}

/* Componentes reutilizáveis */
.btn-primary {
    background-color: #1e40af;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #dc2626;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #b91c1c;
}

.btn-outline {
    border: 2px solid #1e40af;
    color: #1e40af;
    background-color: transparent;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

.btn-outline:hover {
    background-color: #1e40af;
    color: white;
}

.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border: 1px solid #f3f4f6;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.input-field:focus {
    ring: 2px;
    ring-color: #1e40af;
    border-color: transparent;
}

.textarea-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
    resize: vertical;
    min-height: 120px;
}

.textarea-field:focus {
    ring: 2px;
    ring-color: #1e40af;
    border-color: transparent;
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fed7aa;
    color: #d97706;
}

.alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* Tabelas */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Badge/Status */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fffbeb;
    color: #d97706;
}

.badge-error {
    background-color: #fef2f2;
    color: #dc2626;
}

.badge-info {
    background-color: #eff6ff;
    color: #1d4ed8;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #1e40af;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
    border-radius: 0.5rem;
    z-index: 1;
    border: 1px solid #e5e7eb;
}

.dropdown-content a {
    color: #374151;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f9fafb;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* File upload */
.file-upload {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

.file-upload:hover {
    border-color: #1e40af;
}

.file-upload.dragover {
    border-color: #1e40af;
    background-color: #eff6ff;
}

/* Responsividade customizada */
@media (max-width: 768px) {
    .card {
        padding: 1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .table-container {
        font-size: 0.875rem;
    }
}

/* Animações suaves */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Utilitários específicos da revista */
.article-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.edition-cover {
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 0.5rem;
}

.text-justify {
    text-align: justify;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
} 