/* Phone Formatter Custom Styles */

/* Background and Layout */
.gradient-bg {
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 50%, #faf5ff 100%);
}

.gradient-header {
    background: linear-gradient(90deg, #01a479 0%, #01a479 50%, #7acf6c 100%);
}

.imagem-centralizada {
    display: block;
    margin: 0 auto;
}

/* Drag and Drop Styles */
.drag-over {
    border-color: #10b981 !important;
    background-color: #ecfdf5 !important;
    transform: scale(1.02);
}

.drag-active {
    border-color: #059669 !important;
    background-color: #d1fae5 !important;
}

/* Error Notification System */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

.error-notification.hide {
    animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.error-notification .error-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.error-notification .error-icon {
    width: 20px;
    height: 20px;
    color: #ef4444;
    margin-right: 8px;
}

.error-notification .error-title {
    font-weight: 600;
    color: #dc2626;
    font-size: 14px;
}

.error-notification .error-message {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

.error-notification .error-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
}

.error-notification .error-close:hover {
    color: #6b7280;
}

/* Modal Animations */
.modal-backdrop {
    transition: opacity 0.3s ease-out;
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
    transform-origin: center center;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Hover Effects */
.hover-lift {
    transition: all 0.2s ease-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse Animation */
.pulse-glow {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    }
}

/* Smooth scrollbar for modals */
.modal-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Template Card Enhancements */
.template-card {
    transition: all 0.3s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.template-card .icon-container {
    transition: transform 0.2s ease;
}

.template-card:hover .icon-container {
    transform: scale(1.1);
}

.template-card .decorative-circle {
    transition: transform 0.3s ease;
}

.template-card:hover .decorative-circle {
    transform: translate(24px, -24px) scale(1.25);
}

/* Button Enhancements */
.btn-gradient {
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Loading States */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .error-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .template-card {
        margin-bottom: 1rem;
    }
}

/* Focus States for Accessibility */
.focus-ring:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Improved Table Styles */
.phone-table {
    border-collapse: separate;
    border-spacing: 0;
}

.phone-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.phone-table tr:hover {
    background-color: #f8fafc;
    transform: scale(1.005);
    transition: all 0.2s ease;
}

/* Status Indicators */
.status-valid {
    color: #059669;
    animation: fadeIn 0.3s ease;
}

.status-invalid {
    color: #dc2626;
    animation: fadeIn 0.3s ease;
}

.status-duplicate {
    color: #d97706;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Edição inline */
.editable-cell {
    position: relative;
    cursor: pointer;
    padding-right: 2rem !important;
}

.edit-overlay {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s;
}

.editable-cell:hover .edit-overlay {
    opacity: 0.5;
}

.edit-actions {
    position: absolute;
    right: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.25rem;
    z-index: 10;
}

.edit-button {
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-button.confirm {
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
}

.edit-button.confirm:hover {
    background-color: #bbf7d0;
    transform: scale(1.05);
}

.edit-button.cancel {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.edit-button.cancel:hover {
    background-color: #fecaca;
    transform: scale(1.05);
}

.edit-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #3b82f6;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    outline: none;
    background: white;
    z-index: 5;
}

.edit-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.save-animation {
    animation: pulse 0.3s ease-in-out;
}

/* Ajustes na tabela */
.table td {
    white-space: nowrap;
    max-width: none !important;
    overflow: visible !important;
}

td.editable-cell {
    width: 250px !important;
    max-width: 250px !important;
    min-width: 250px !important;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.save-animation {
    animation: pulse 0.3s ease-in-out;
}

/* Cards de Estatísticas */
.stats-card {
    transition: all 0.2s ease-out;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.stats-card.active {
    position: relative;
}

.stats-card.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.5rem;
    padding: 2px;
    background: linear-gradient(to right, currentColor, currentColor);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Hover effects para os cards */
.stats-card:hover .stats-icon {
    transform: scale(1.1);
}

.stats-icon {
    transition: transform 0.2s ease-out;
}

/* Animação de entrada para os números */
@keyframes countUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stats-number {
    animation: countUp 0.5s ease-out forwards;
}

/* Estilo para o card ativo */
.stats-card.active .stats-icon {
    transform: scale(1.1);
}

/* Modal de Confirmação */
.confirm-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.confirm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
}

.confirm-modal-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: #EF4444;
}

.confirm-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.confirm-modal-message {
    color: #6B7280;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.confirm-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.confirm-modal-button {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.confirm-modal-button.cancel {
    background: #F3F4F6;
    color: #374151;
}

.confirm-modal-button.cancel:hover {
    background: #E5E7EB;
}

.confirm-modal-button.confirm {
    background: #EF4444;
    color: white;
}

.confirm-modal-button.confirm:hover {
    background: #DC2626;
}

/* Menu de Exportação */
.export-menu-item {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.export-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.3s ease;
    z-index: -1;
}

.export-menu-item:hover::before {
    left: 0;
}

/* Variações de cores para cada tipo de exportação */
.export-menu-item.excel::before {
    background-color: #f3e8ff;
}

.export-menu-item.csv::before {
    background-color: #dbeafe;
}

.export-menu-item.postzap::before {
    background-color: #dcfce7;
}

/* Garante que o conteúdo fique acima do background */
.export-menu-item > * {
    position: relative;
    z-index: 2;
} 