/**
 * Calculadora de Juros Compostos - Styles
 * Tema: Verde Financeiro com Glassmorphism
 */

:root {
    --primary-green: #27ae60;
    --dark-green: #1e8449;
    --light-green: #2ecc71;
    --success-green: #28a745;
    --gold: #f39c12;
}

/* Icon Circle */
.icon-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(39, 174, 96, 0.3);
}

.icon-circle i {
    font-size: 3rem;
    color: white;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

/* Form Styles */
.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 12px;
    border: 2px solid rgba(39, 174, 96, 0.2);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(39, 174, 96, 0.15);
}

.form-text {
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    border: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
}

.btn-outline-secondary {
    border-radius: 10px;
    border: 2px solid rgba(149, 165, 166, 0.3);
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: rgba(149, 165, 166, 0.1);
    border-color: var(--primary-green);
    color: var(--primary-green);
}

/* Result Cards */
.result-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.result-card:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-icon i {
    font-size: 1.5rem;
    color: white;
}

.result-info {
    flex: 1;
}

.result-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 350px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 1.5rem;
}

/* Comparison Table */
.comparison-table {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table thead {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
}

.comparison-table thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.comparison-table tbody td {
    padding: 0.875rem 1rem;
    border-color: rgba(0, 0, 0, 0.05);
}

.comparison-table .table-success {
    background: rgba(46, 204, 113, 0.1);
}

/* Formula Box */
.formula-box {
    background: rgba(52, 73, 94, 0.05);
    border-left: 4px solid var(--primary-green);
    padding: 1rem;
    border-radius: 8px;
}

.formula-box code {
    display: block;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.95rem;
    color: var(--dark-green);
    margin: 0.5rem 0;
}

/* Alerts */
.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border-left: 4px solid var(--success-green);
    border-radius: 12px;
}

/* Accordion */
.accordion-item {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 0.5rem;
    border-radius: 12px !important;
    overflow: hidden;
}

.accordion-button {
    background: rgba(255, 255, 255, 0.5);
    color: #2c3e50;
    font-weight: 600;
    border: none;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(46, 204, 113, 0.1));
    color: var(--dark-green);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-body {
    background: rgba(255, 255, 255, 0.3);
    padding: 1.25rem;
}

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

#results-section {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .icon-circle {
        width: 80px;
        height: 80px;
    }
    
    .icon-circle i {
        font-size: 2.5rem;
    }
    
    .result-value {
        font-size: 1.25rem;
    }
    
    .chart-container {
        height: 300px;
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Prevent horizontal scroll */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Responsive tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 100%;
        font-size: 0.875rem;
    }
    
    /* Full width inputs and buttons on mobile */
    .form-control,
    .form-select,
    .btn {
        width: 100%;
        max-width: 100%;
    }
    
    /* Smaller text on mobile */
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Loading State */
.btn-primary:disabled {
    background: linear-gradient(135deg, #95a5a6, #bdc3c7);
    cursor: not-allowed;
    transform: none;
}

/* Tooltips */
.form-text strong {
    color: var(--primary-green);
}

/* Success State */
.text-success {
    color: var(--success-green) !important;
}

/* Primary State */
.text-primary {
    color: var(--primary-green) !important;
}
