/* Estilos customizados para a Calculadora de ROI */

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1f2937;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Smooth transitions */
.transition-all {
    transition: all 0.3s ease;
}

/* Print styles */
@media print {
    body {
        background: white !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    .bg-gradient-to-br {
        background: white !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Ajustes específicos para mobile */
    .whitespace-nowrap {
        white-space: normal;
    }
    
    /* Garantir que os títulos não quebrem desnecessariamente */
    h3 {
        font-size: 1rem !important;
    }
}

/* Card hover effects */
.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover\:-translate-y-1:hover {
    transform: translateY(-0.25rem);
}

/* Focus styles */
input:focus {
    outline: none !important;
    border-color: var(--focus-color, #3b82f6) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Animation for arrows */
.rotate-180 {
    transform: rotate(180deg);
}

/* Custom scrollbar for tables */
.overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Footer styles */
.footer-section {
    background: linear-gradient(to bottom, rgba(249, 250, 251, 0.8), rgba(243, 244, 246, 0.9));
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-divider {
    background: linear-gradient(to right, transparent, #d1d5db, transparent);
    height: 1px;
    width: 100%;
}

/* Modal styles */
.modal-overlay {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.hidden {
    animation: fadeOut 0.2s ease-out;
}

.modal-content {
    animation: slideIn 0.3s ease-out;
    transform: translateY(0);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Modal animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Responsive modal adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    /* Botões do rodapé em coluna no mobile */
    .footer-section > div {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-section button {
        width: 100%;
        max-width: 320px;
        min-width: unset;
    }
}

/* Botão primário destaque */
.footer-section button[onclick] {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    transform: scale(1);
    transition: all 0.2s ease;
}

.footer-section button[onclick]:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

/* Result Cards - Tamanho padronizado */
.result-card {
    height: 200px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.result-card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Text clamp para títulos longos */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5rem;
}

/* Quebra de palavras para valores grandes */
.break-words {
    word-break: break-word;
    hyphens: auto;
}

/* Ajustes responsivos para cards */
@media (max-width: 640px) {
    .result-card {
        height: 180px;
        max-width: 100%;
    }
    
    .result-card-content {
        padding: 1rem;
    }
    
    .result-card .text-2xl {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    .result-card {
        height: 220px;
        max-width: 300px;
    }
}

/* Container dos cards com tooltip */
.flex.items-center.gap-2.w-full.max-w-xs {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

/* Ajuste para centralizar melhor no grid */
.place-items-center {
    place-items: center;
}

/* Garantir que o card ocupe toda a largura disponível no container */
.result-card {
    flex: 1;
    min-width: 0;
} 