/* ===================================
   CALCULADORA DE PERCENTUAL - STYLES
   Tema: Verde Financeiro (#27ae60)
   =================================== */

/* Variáveis de Cores */
:root {
    --color-primary: #27ae60;
    --color-primary-light: #2ecc71;
    --color-primary-dark: #229954;
    --color-success: #27ae60;
    --color-warning: #f39c12;
    --color-danger: #e74c3c;
    --color-info: #3498db;
}

/* Hero Section */
.calculator-hero {
    min-height: 200px;
    display: flex;
    align-items: center;
}

.hero-icon i {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Mode Selector */
.btn-group .btn-check:checked + .btn-outline-success {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.btn-outline-success {
    border-color: var(--color-success);
    color: var(--color-success);
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: white;
    transform: translateY(-2px);
}

/* Calculator Modes */
.calculator-mode {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Inputs */
.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-success);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(39, 174, 96, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-group-text {
    background: rgba(39, 174, 96, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--color-success);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Calculate Button */
.btn-success {
    background: linear-gradient(135deg, var(--color-success), var(--color-primary-light));
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-success:hover::before {
    left: 100%;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-success));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.3);
}

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

/* Result Card */
.result-card {
    animation: slideIn 0.5s ease;
    border-left: 4px solid var(--color-success);
}

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

.result-value {
    text-shadow: 0 2px 10px rgba(39, 174, 96, 0.3);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.result-breakdown {
    padding: 10px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--color-success);
}

.result-explanation {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* Examples Section */
.example-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 3px solid var(--color-success);
    transition: all 0.3s ease;
}

.example-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

/* Steps List */
.step-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.step-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.step-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Formulas Section */
.formula-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.formula-item code {
    display: block;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 8px;
    border-left: 3px solid var(--color-success);
}

/* FAQ Accordion */
.accordion-button {
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: var(--color-success);
    color: white;
}

.accordion-button:hover {
    background: rgba(39, 174, 96, 0.2);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(39, 174, 96, 0.25);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column !important;
    }
    
    .btn-group label {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    .hero-icon i {
        font-size: 3rem !important;
    }
    
    .result-value {
        font-size: 2rem !important;
    }
}

/* Loading Animation */
.btn-success.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-success.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

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

/* Success/Error States */
.is-valid {
    border-color: var(--color-success) !important;
}

.is-invalid {
    border-color: var(--color-danger) !important;
}

/* Tooltip Customizado */
.custom-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.custom-tooltip .tooltip-text {
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    white-space: nowrap;
}

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

/* Print Styles */
@media print {
    .calculator-mode,
    .glass-card,
    .result-card {
        background: white !important;
        color: black !important;
    }
    
    .btn-success {
        display: none;
    }
}