/* Container Principal */
.sniphub-calculator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
    box-sizing: border-box;
    padding: 0;
}

.sniphub-calculator * {
    box-sizing: border-box;
}



/* Header Styles */
.calculator-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.calculator-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.2;
    padding: 0;
}

.calculator-header h2:not(:has(span)) {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-header p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    margin: 0;
    padding: 0;
}

/* Input Section */
.input-section {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
}

/* Adiciona margem apenas quando os resultados estão visíveis */
.input-section + .results-section[style*="display: block"] {
    margin-top: 30px;
}

.input-group {
    margin-bottom: 28px;
}



.input-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.currency-symbol {
    position: static;
    color: #6366f1;
    font-weight: 600;
    font-size: 1rem;
    pointer-events: none;
    opacity: 0.9;
    background: transparent;
    line-height: 1;
    user-select: none;
}

.sniphub-input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.currency-input {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 20px !important; /* usa o mesmo padding do input padrão */
    text-indent: 0 !important;
}

.sniphub-input::-webkit-outer-spin-button,
.sniphub-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sniphub-input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.sniphub-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.sniphub-input.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* Button Styles */
.calculate-btn {
    width: 100%;
    min-height: 60px;
    padding: 18px 40px;
    margin-top: 10px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
    word-wrap: break-word;
}

.calculate-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: none;
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Section */
.results-section {

    position: relative;
    z-index: 1;
}



.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

/* Results Content */
.results-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .results-content {
        grid-template-columns: 1fr;
    }
}

.result-item {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    text-align: center;
}



.result-item.highlight {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
    grid-column: 1 / -1;
}

.result-value {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.result-item.highlight .result-value {
    font-size: 2.8rem;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    letter-spacing: 0.3px;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    font-weight: 500;
    max-width: 600px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 280px;
    max-width: 100%;
    width: auto;
    white-space: nowrap;
    padding: 18px 48px;
    background: #10b981;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 480px) {
    .cta-btn {
        min-width: 220px;
        padding: 16px 32px;
        font-size: 0.95rem;
        white-space: normal;
        height: auto;
        min-height: 54px;
    }
}

.cta-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: none;
}

/* Error Message */
.sniphub-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Elementor Editor Specific */
.elementor-editor-active .sniphub-calculator {
    min-height: 400px;
}

/* Ensure proper stacking in Elementor sections */
.elementor-section .sniphub-calculator {
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sniphub-calculator {
    }

    .calculator-header h2 {
        font-size: 1.875rem;
    }

    .calculator-header p {
        font-size: 1rem;
    }

    

    .input-group {
        margin-bottom: 20px;
    }

    .sniphub-input {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .calculate-btn,
    .cta-btn {
        padding: 16px 32px;
        font-size: 1rem;
    }

    .result-value {
        font-size: 1.75rem;
    }

    .result-item.highlight .result-value {
        font-size: 2.25rem;
    }

    .results-content {
        grid-template-columns: 1fr;
    }

    .results-header h3 {
        font-size: 1.5rem;
    }

    .cta-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .sniphub-calculator {
    }

    .calculator-header h2 {
        font-size: 1.5rem;
    }

    .input-section {
        border-radius: 12px;
    }

    .sniphub-input {
        padding: 12px 15px;
        border-radius: 8px;
        font-size: 0.95rem;
    }

    .calculate-btn,
    .cta-btn {
        padding: 15px 30px;
        border-radius: 8px;
        font-size: 0.95rem;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .result-item.highlight .result-value {
        font-size: 2rem;
    }

    .result-item {
        padding: 20px;
        border-radius: 12px;
    }

    .cta-section {
        margin-top: 35px;
    }
}

/* Elementor Editor Specific */
.elementor-editor-active .sniphub-calculator {
    min-height: 400px;
}

/* Override Some Elementor Default Styles When Needed */
.elementor-widget-sniphub-calculator .elementor-widget-container {
    transition: all 0.3s ease;
}

/* Ensure proper stacking in Elementor sections */
.elementor-section .sniphub-calculator {
    position: relative;
    z-index: 1;
}

/* Animation Performance Optimization */
@media (prefers-reduced-motion: reduce) {
    .results-section {
        animation: none;
    }
    
    .sniphub-error {
        animation: none;
    }
    
    .calculate-btn,
    .cta-btn,
    .result-item,
    .sniphub-input {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .sniphub-calculator {
        background: white !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    

    
    .calculate-btn,
    .cta-btn {
        display: none;
    }
}