/**
 * Estilos dos Componentes Compartilhados - Spotter
 * Estilos para componentes reutilizáveis
 */

/* ====================================
   Loading States
   ==================================== */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    min-height: 300px;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.loading-spinner .material-icons {
    font-size: 48px;
    color: var(--primary);
}

.loading-spinner .material-icons.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-message {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Skeleton Loaders */
.skeleton-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--border);
}

.skeleton-text-group {
    flex: 1;
}

.skeleton-line {
    height: 12px;
    background: var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.skeleton-line-title {
    width: 60%;
    height: 16px;
}

.skeleton-line-subtitle {
    width: 40%;
}

.skeleton-line-short {
    width: 30%;
}

.skeleton-body {
    margin-bottom: var(--spacing-lg);
}

.skeleton-footer {
    display: flex;
    justify-content: space-between;
}

.skeleton-button {
    width: 100px;
    height: 40px;
    background: var(--border);
    border-radius: var(--radius-md);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Progress Bar */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.progress-bar-track {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.progress-bar-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 45px;
    text-align: right;
}

/* ====================================
   Alerts e Mensagens
   ==================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.alert .material-icons {
    font-size: 24px;
    flex-shrink: 0;
}

.alert p {
    flex: 1;
    margin: 0;
    color: inherit;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(244, 197, 66, 0.1);
    color: #F4C542;
    border: 1px solid rgba(244, 197, 66, 0.2);
}

/* Toasts */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease;
}

.toast-exit {
    animation: slideOut 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-success {
    background: rgba(16, 185, 129, 0.95);
    color: white;
}

.toast-error {
    background: rgba(239, 68, 68, 0.95);
    color: white;
}

.toast-warning {
    background: rgba(245, 158, 11, 0.95);
    color: white;
}

.toast-info {
    background: rgba(244, 197, 66, 0.95);
    color: #1a1a1a;
}

.toast p {
    flex: 1;
    margin: 0;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* ====================================
   Modal
   ==================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: var(--spacing-lg);
    animation: fadeIn 0.3s ease;
}

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

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-small {
    width: 100%;
    max-width: 400px;
}

.modal-medium {
    width: 100%;
    max-width: 600px;
}

.modal-large {
    width: 100%;
    max-width: 900px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    color: var(--text-secondary);
    transition: all 0.2s;
    border-radius: var(--radius-sm);
}

.modal-close-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    padding: var(--spacing-xl);
    border-top: 1px solid var(--border);
}

/* ====================================
   Empty State
   ==================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    text-align: center;
    min-height: 400px;
}

.empty-state-icon {
    font-size: 80px !important;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
}

.empty-state-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-xl) 0;
    max-width: 400px;
}

/* ====================================
   Badges
   ==================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-info {
    background: rgba(244, 197, 66, 0.15);
    color: #F4C542;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.verified-badge .material-icons {
    font-size: 18px;
}

/* ====================================
   Pagination
   ==================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-2xl) 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--border);
    border-color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--text-tertiary);
    padding: 0 var(--spacing-sm);
}

/* ====================================
   Responsive
   ==================================== */

@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .modal {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-small,
    .modal-medium,
    .modal-large {
        max-width: none;
        width: 100%;
    }

    .empty-state {
        min-height: 300px;
        padding: var(--spacing-2xl) var(--spacing-md);
    }

    .empty-state-icon {
        font-size: 60px !important;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

