/* === CALCULADORA LATERAL === */

.calc-sidebar-btn {
    position: fixed;
    right: 0;
    top: 60%;
    transform: translateY(-50%);
    width: 30px;
    height: 80px;
    background: linear-gradient(135deg, #2a2a2a, #006666);
    border: 1px solid var(--accent-primary);
    border-right: none;
    border-radius: 15px 0 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: -2px 0 10px rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.calc-sidebar-btn:hover {
    transform: translateY(-50%) translateX(-5px);
    box-shadow: -5px 0 15px rgba(0, 255, 255, 0.5);
}

.calc-sidebar-btn i {
    color: white;
    font-size: 16px;
}

.calc-sidebar {
    position: fixed;
    right: -320px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 80vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--accent-primary);
    border-radius: 15px 0 0 15px;
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 20px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.calc-sidebar.open {
    right: 0;
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: var(--accent-primary);
    font-weight: 600;
}

.calc-close-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal da Calculadora */
.calc-display {
    margin-bottom: 15px;
}

.calc-result {
    width: 100%;
    height: 35px;
    background: transparent;
    border: none;
    color: var(--accent-primary);
    font-size: 18px;
    font-weight: bold;
    text-align: right;
    padding: 0 15px;
    font-family: 'Courier New', monospace;
    margin-bottom: 5px;
}

.calc-screen {
    width: 100%;
    height: 50px;
    background: #1a1a1a;
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-align: right;
    padding: 0 15px;
    font-family: 'Courier New', monospace;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-btn {
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calc-btn:hover {
    background: var(--accent-primary);
    color: black;
    transform: scale(1.05);
}

.calc-btn:active {
    transform: scale(0.95);
}

.calc-number {
    background: var(--bg-input);
}

.calc-operator {
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: white;
}

.calc-clear {
    background: linear-gradient(135deg, #00e0ff, #00aaff);
    color: white;
}

.calc-equals {
    background: linear-gradient(135deg, #00ffff, #00e0ff);
    color: black;
    font-weight: bold;
}

.calc-zero {
    grid-column: span 1;
}

.calc-equals {
    background: linear-gradient(135deg, #00ffff, #00e0ff);
    color: black;
    font-weight: bold;
    grid-row: span 2;
}

/* Responsivo */
@media (max-width: 768px) {
    .calc-sidebar-btn {
        width: 20px;
        height: 50px;
    }
    
    .calc-sidebar-btn i {
        font-size: 12px;
    }
    
    .calc-sidebar {
        width: 90vw;
        right: -90vw;
        top: 60%;
        transform: translateY(-50%);
        height: 50vh;
        padding: 10px;
        border-radius: 15px;
    }
    
    .calc-screen {
        height: 50px;
        font-size: 20px;
    }
    
    .calc-btn {
        height: 35px;
        font-size: 14px;
    }
    
    .calc-screen {
        height: 35px;
        font-size: 16px;
    }
    
    .calc-result {
        height: 20px;
        font-size: 12px;
    }
}