/**
 * coin-info-modal-hybrid.css - Estilos para Modal de Informações da Criptomoeda (Versão Híbrida)
 * 
 * Combina o design azul funcionando do backup com melhorias visuais
 * 
 * Versão: 2.0.0 (Híbrida)
 * Data: 22/07/2025
 */

/* Modal Container */
.coin-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.coin-info-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.coin-info-modal-content {
    background: #1f2937;
    border-radius: 12px;
    max-width: 1200px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.coin-info-modal.active .coin-info-modal-content {
    transform: translateY(0);
}

/* Modal Header - Estilo Azul do Backup */
.coin-info-modal-header {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.coin-info-modal-title {
    display: flex;
    align-items: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.coin-info-modal-title i {
    margin-right: 10px;
    color: #fbbf24;
}

.coin-info-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.coin-info-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal Body */
.coin-info-modal-body {
    padding: 24px;
    color: white;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

/* Custom Scrollbar */
.coin-info-modal-body::-webkit-scrollbar {
    width: 8px;
}

.coin-info-modal-body::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 4px;
}

.coin-info-modal-body::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

.coin-info-modal-body::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Loading Animation */
.coin-info-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.coin-info-loading-spinner {
    width: 64px;
    height: 64px;
    border: 4px solid #374151;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Error State */
.coin-info-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.coin-info-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

/* Botão de Informações nos Cards */
.coin-info-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.coin-info-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.5);
}

/* Elementos Clicáveis */
.cursor-pointer {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.cursor-pointer:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.cursor-pointer.copied {
    animation: copyFeedback 0.3s ease;
}

@keyframes copyFeedback {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Gradientes Personalizados */
.bg-gradient-to-r.from-blue-900.to-purple-900 {
    background: linear-gradient(135deg, #1e3a8a, #581c87);
}

.bg-gradient-to-r.from-purple-900.to-pink-900 {
    background: linear-gradient(135deg, #581c87, #831843);
}

.bg-gradient-to-r.from-yellow-600.to-orange-600 {
    background: linear-gradient(135deg, #d97706, #ea580c);
}

/* Responsividade */
@media (max-width: 768px) {
    .coin-info-modal {
        padding: 10px;
    }
    
    .coin-info-modal-content {
        max-height: calc(100vh - 20px);
    }
    
    .coin-info-modal-header {
        padding: 16px;
    }
    
    .coin-info-modal-title {
        font-size: 18px;
    }
    
    .coin-info-modal-body {
        padding: 16px;
        max-height: calc(100vh - 120px);
    }
    
    .grid.grid-cols-1.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .grid.grid-cols-1.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .grid.grid-cols-1.lg\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .coin-info-modal-title {
        font-size: 16px;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
    
    .text-2xl {
        font-size: 1.25rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    .grid.grid-cols-1.md\\:grid-cols-4 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Animações de Entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coin-info-modal.active .coin-info-modal-body > * {
    animation: fadeInUp 0.5s ease forwards;
}

.coin-info-modal.active .coin-info-modal-body > *:nth-child(1) {
    animation-delay: 0.1s;
}

.coin-info-modal.active .coin-info-modal-body > *:nth-child(2) {
    animation-delay: 0.2s;
}

.coin-info-modal.active .coin-info-modal-body > *:nth-child(3) {
    animation-delay: 0.3s;
}

.coin-info-modal.active .coin-info-modal-body > *:nth-child(4) {
    animation-delay: 0.4s;
}

/* Cores Personalizadas */
.text-green-400 { color: #4ade80; }
.text-red-400 { color: #f87171; }
.text-blue-400 { color: #60a5fa; }
.text-yellow-400 { color: #facc15; }
.text-orange-400 { color: #fb923c; }
.text-pink-400 { color: #f472b6; }
.text-purple-400 { color: #c084fc; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }

.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }

/* Utilitários */
.rounded-lg { border-radius: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.space-y-3 > * + * { margin-top: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }

.transition-colors { transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out; }

.hover\\:bg-gray-100:hover { background-color: #f3f4f6; }

/* Media Queries para Grid Responsivo */
@media (min-width: 768px) {
    .md\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

